控制台運作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