npm install 报错 error code 1

错误日志:

error code 1
error path /Users/myPath/myProject/node_modules/puppeteer
error command failed
error command sh -c node install.js

解决方法

#更新node.js为 v20.8.1 原版本 v20.4.1 (非必做)

#更改淘宝源
npm config set registry "https://registry.npm.taobao.org"

#执行install 时 加 sudo
sudo npm install

文章作者: ABin
本文链接:
版权声明: 本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 ABin!