npm i 下载失败,报错:node-sass 安装失败 Failed at the [email protected] postinstall script....

控制台运行npm install时报错,报错信息如下: npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: `node scripts/build.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.

 解决方法: 1、卸载node-sass 运行:npm uninstall node-sass 

 2、重新安装指定的node-sass版本(安装失败的版本) 运行:npm install [email protected] 

 3、如果还是安装不成功的话,或者安装太慢连接不上,使用一下淘宝镜像后重复1,2步骤,成功后再npm install 使用淘宝镜像运行:npm config set registry https://registry.npm.taobao.org






猜你喜欢

转载自blog.csdn.net/weixin_33676492/article/details/91398565