[Bug] macOS Run: pnpm script fails with "env: node: No such file or directory"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 54/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- macos, node.js, typescript
Research direction
Start by tracing RunExecutableResolver and PathRunToolchainProvider, then compare their PATH handling with MacRuntimeToolDiscovery. Reproduce from a Finder launched app using a pnpm project whose Node.js path comes from fnm. Done when Run can launch the selected script with a resolvable Node.js interpreter under the reported environment.
Written by the indexing model from the issue text.
Description
Platform / 平台
macOS
Area / 模块
Run / 运行
Lithe version / Lithe 版本
0.6.2(build 55,release 安装包)
Priority / 优先级
P1 / 尽快处理:使用体验大幅下降,但通常仍可继续使用
OS and architecture / 操作系统与架构
macOS 27.2(26B5101f),Apple M4,arm64,16 GB 内存
Environment / 环境信息
- Lithe:0.6.2(build 55),GUI 启动(Finder),未使用自定义数据/配置目录;安装来源未采集。
- 项目:
<WORKSPACE>,pnpm 管理的 Node.js/TypeScript 项目,单项目、本地磁盘。 - Node.js:v22.22.0,fnm 管理(
<HOME>/.local/state/fnm_multishells/.../bin/node)。 - pnpm:10.12.1,Homebrew 安装(
/opt/homebrew/bin/pnpm),启动脚本 shebang 为#!/usr/bin/env node。 - Lithe 进程继承 launchd 的最小 PATH(
/usr/bin:/bin:/usr/sbin:/sbin),其中不含 fnm 与 Homebrew 目录;终端 Shell 的 PATH 包含上述目录。 - 相关插件/扩展:无(使用内置 Run 工具窗口)。
- 远程/WSL/容器:不适用。
- 交叉验证:最新发布源码 v0.6.4(提交 9155935b5)中 Run 命令解析路径与本问题一致,尚未在 v0.6.4 运行包上实测。
Steps to reproduce / 复现步骤
- 从 Finder 启动 Lithe(而非从终端启动)。
- 打开 pnpm 项目
<WORKSPACE>。 - 打开 Run 工具窗口,选择 package.json 中的脚本
clean。 - 点击脚本行的运行图标。
- 输出窗口先显示
$ pnpm run clean,随后立即报错env: node: No such file or directory。
发生频率:100%。任何以 pnpm / npm / yarn / tsx 等需要 node 的启动器执行的脚本都会失败。从终端直接执行 pnpm run clean 正常。
Expected behavior / 预期行为
点击运行图标后,Lithe 应使用可解析的 Node.js 环境启动 pnpm run clean,与在终端执行结果一致。
Actual behavior / 实际行为
进程没有真正启动,Run 窗口在 $ pnpm run clean 之后立即输出 env: node: No such file or directory。表现为:Lithe 能定位到 Homebrew 的 pnpm,但传给子进程的 PATH 缺少 node 所在目录,导致 pnpm 的 #!/usr/bin/env node 无法解析解释器。
初步分析(待维护者确认):GUI 启动的 Lithe 只继承 launchd 最小 PATH;RunExecutableResolver 与 PathRunToolchainProvider 在解析出可执行文件后,没有把该可执行文件所在目录加入子进程 PATH。这与 MacRuntimeToolDiscovery 能跨 PATH/Homebrew/fnm 找到 pnpm 的能力不一致。
Logs or diagnostic output / 日志或诊断输出
$ pnpm run clean
22:18:44.663 env: node: No such file or directory
该错误在点击运行图标后立即出现,不涉及脚本内部逻辑。
Screenshots or recordings / 截图或录屏
未提供(日志已包含关键错误信息)。
Checklist / 提交前检查
- I searched existing issues for duplicates. / 我已搜索现有 Issue,确认没有重复报告。
- I removed secrets and personal data from the report. / 我已从报告中移除敏感信息和个人数据。
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 151
- Avg merge
- 13h 18m
- Merged PRs (30d)
- 339
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 1lck/Lithe-IDEA
-
area:editor bug P0 platform:macos review: low
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
1lck/Lithe-IDEA#1118 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] 修改路径排除逻辑,取消固定的不显示方案Possibly taken @1lck claimed this today. Openarea:editor bug issue-form:bug P0 platform:macos review: medium
1lck/Lithe-IDEA#1482 · 1 assignee ·
Maintainers usually reply within 1 day
-
area:editor bug issue-form:bug P0 platform:macos review: medium
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
1lck/Lithe-IDEA#1481 ·
Maintainers usually reply within 1 day
-
area:editor enhancement issue-form:feature P0 platform:windows review: low
Difficulty 4/5 3-5 days Newbie friendliness 45/100
1lck/Lithe-IDEA#1475 ·
Maintainers usually reply within 1 day
-
[Feature] Add Kotlin support plzPossibly taken @haloneko claimed this 1 day ago. Openarea:language claimed enhancement issue-form:feature P2 platform:cross-platform review: low
1lck/Lithe-IDEA#1465 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
[good first issue, hacktoberfest] 🏯 Hacktoberfest Task - Add new Japan Fact 898 (good-first-issue)Opencommunity first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 86/100
lingdojo/kana-dojo#33145 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
code-yeongyu/senpi#4278 ·
Maintainers usually reply within 1 day
-
[Bug] Activity | The activity list ignores taskIds and returns the activities of every taskPossibly taken @NdekoCode claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ever-co/ever-gauzy#11469 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
griffinwork40/agent-afk#4408 ·
Maintainers usually reply within 1 day