agentscope-ai / agentscope-ai/QwenPaw

Shell 环境缺少 node 软链接,手动创建后更新会丢失

Open
#3,809 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
34.9k
Forks
3.1k
Avg merge
1d 15h
Merged PRs (30d)
225

Description

## 问题描述

QwenPaw 的 shell 环境 PATH 被限制为:
- `/Applications/QwenPaw.app/Contents/Resources/env/bin`
- `/usr/bin`、`/bin`、`/usr/sbin`、`/sbin`

env 目录中没有预置 node/npm/npx 的软链接,导致 agent 无法直接使用 `node` 命令,必须使用绝对路径。

## 复现步骤

1. 安装 QwenPaw
2. 在 agent 中执行 `which node` → 找不到
3. 手动创建软链接到 fnm 的 node 安装路径后可用
4. QwenPaw 更新后软链接丢失,需要重新创建

## 环境信息

- **Node 管理方式**:使用 fnm (Fast Node Manager) 安装 node
- **Node 路径**:`~/.local/share/fnm/node-versions/v24.14.1/installation/bin/node`
- **QwenPaw 版本**:最新版(2026-04-24)
- **操作系统**:macOS Darwin 25.4.0 (arm64)

## 期望行为

QwenPaw 的 env 目录中应该预置 node/npm/npx 的软链接(或在 shell 启动时自动加载 fnm/nvm 等 node 版本管理器的环境),使得 agent 可以直接使用 `node` 命令。

## 当前 workaround

每次 QwenPaw 更新后手动执行:
```bash
ln -sf ~/.local/share/fnm/node-versions//installation/bin/node /Applications/QwenPaw.app/Contents/Resources/env/bin/node
ln -sf ~/.local/share/fnm/node-versions//installation/bin/npm /Applications/QwenPaw.app/Contents/Resources/env/bin/npm
ln -sf ~/.local/share/fnm/node-versions//installation/bin/npx /Applications/QwenPaw.app/Contents/Resources/env/bin/npx
```

## 补充说明

- 这个问题可能不仅影响 fnm 用户,使用 nvm、volta 等 node 版本管理器的用户可能也会遇到
- 如果用户通过 Homebrew 安装 node(路径 `/opt/homebrew/bin`),同样不在 QwenPaw 的 PATH 中
- 建议在 QwenPaw 首次启动或更新时自动检测并创建 node 软链接

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.