npm install 时候报错 [email protected] postinstall: `node lib/install.js`

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/effy/.npm/_logs/2023-08-19T07_10_44_710Z-debug.log

解决办法: 

1.删除项目中的node_modules文件夹和package-lock.json文件

2.执行npm install --ignore-scripts

npm install --ignore-scripts

猜你喜欢

转载自blog.csdn.net/m0_73442728/article/details/132380280