ExternalRuntime command searching slightly incompatible with nodenv
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, nodejs, ruby
研究方向
Start by reading the ExternalRuntime command-search logic and reproducing the nodenv shim case described in the issue. Determine how an unusable node shim should be treated and verify that the runtime can fall back to JavaScriptCore when appropriate.
由索引模型根據 Issue 內容生成。
描述
(I thought a bit about how to correct this corner case without significant updates to the library, but didn't come up with anything that I could send over.)
When using nodenv to handle different node versions, but not having a global node version available, the ExternalRuntime logic breaks down. This is due to nodenv providing a path-accessible shim for the node binary regardless of whether it actually points to a valid node install. So, execjs will get through load time successfully, but fall over at runtime when actually shelling out to node.
Here is the gist of the environment:
$ which node
/Users/jimmy/.nodenv/shims/node
$ node
nodenv: node: command not found
The `node' command exists in these Node versions:
4.2.1
4.2.6
4.4.0
5.4.0
6.10.0
7.4.0
This can be avoided by explicitly preferring JavaScriptCore (assuming OSX), but I saw that the order of these was purposely swapped so I assume there are reasons things are the way they are currently. Ideally execjs wouldn't be picking up this install in the first place, and then falling back to JavaScriptCore on its own.
Not a big deal, as it is easily worked around, but it was a gotcha nonetheless and I wanted to make you aware of it.
- 主要語言
- Ruby
- 星號
- 581
- 分支
- 285
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
rails/execjs 的其他 Issue
-
Runtime stderr is missing from ruby error message可能已有人在做 @arpitjain099 於 168 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 45/100
-
難度 3/5 1-2 天 新手友好度 35/100
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 4/5 3-5 天 新手友好度 25/100
-
難度 4/5 3-5 天 新手友好度 25/100
相似的 Issue
-
Bug Ruby Waiting for: Product Owner
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-ruby#3228 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
開発用DockerイメージにPlaywrightのシステム依存を追加する可能已有人在做 @momocus 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 85/100
sakazuki-org/sakazuki#1453 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 76/100
jenkins-infra/jenkins.io#9615 · 1 則留言 ·
維護者通常 1 天內回覆