Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] macOS Run: pnpm script fails with "env: node: No such file or directory"

Open
#1,455 1 comment 0 reactions 0 assignees View on GitHub

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
Domain
desktop, tooling

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

area:run bug P1 platform:macos review: medium
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 / 复现步骤
  1. 从 Finder 启动 Lithe(而非从终端启动)。
  2. 打开 pnpm 项目 <WORKSPACE>。
  3. 打开 Run 工具窗口,选择 package.json 中的脚本 clean。
  4. 点击脚本行的运行图标。
  5. 输出窗口先显示 $ 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 1lck/Lithe-IDEA

All issues in 1lck/Lithe-IDEA

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.