npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinst

弄了一下午,算是解决了这个问题,所以记录一下,希望帮助大家。我在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.

分析一下,这个错误的出现是因为sass安装时获取源的问题,修改sass安装的源。
解决办法:使用taobao的npm

npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass

回车后,再输入npm install就完美解决了。

npm install

你可能感兴趣的:(前端)