打开npm直接报错Api invoke error Error invoking remote method 'apiInvoke': Error: /bin/sh: npm: command not found

Author: ammonduCreated Jan 2, 2025Updated Aug 22, 2026
LabelsBug
  • 你是否在现有 Issue列表 中搜索过相同问题,但未找到?

Ⅰ. 请说明操作系统及DS的版本号:

  1. 操作系统:macos 14.7.2
  2. DS版本号:2.0.0-RC1

Ⅱ. 问题描述:

打开npm 直接报错 Api invoke error Error invoking remote method 'apiInvoke': Error: /bin/sh: npm: command not found

Ⅲ. 期望的结果:

解决bug

Ⅳ. 如何复现问题?

直接打开npm就会提示。

Ⅴ. 请提供相关的错误日志,尽可能的详细:(日志文件在 ${user.home}/.dev-sidecar/logs/ 目录下)

bash
[2025-01-02T10:49:06.864] [INFO] core - shell: npm config list --json
commands: npm config list --json 
   error: Error: Command failed: npm config list --json
/bin/sh: npm: command not found
  cmd: 'npm config list --json'