Windows环境执行npm install报错:系统找不到指定路径
npm install执行时报错:系统找不到指定路径
执行npm install时出现如下报错:
The system cannot find the path specified. npm error code 1 npm error path C:\Users\hugome\source\repos-github\hn-root-ui\hn-core-ui npm error command failed npm error command C:\WINDOWS\system32\cmd.exe /d /s /c husky install
已尝试的解决方案:
- 将Node.js和npm更新至团队要求版本(node v22.14.0、npm 11.2.0)
- 检查系统及用户账户环境变量,确认配置正常
- 卸载重装Node.js(切换指定版本后问题仍存在)
- 尝试相关问题的解决方案,包括删除npm和npm-cache文件夹、将node路径移至系统Path变量顶部、执行
npm config set script-shell bash,均未解决问题 - 同事协助排查,仍无法定位机器上的具体问题
内容的提问来源于stack exchange,提问作者Hugo
相关产品推荐
相关产品推荐

