控制檯運行npm install時報錯,報錯信息以下:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.9.2 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
解決方法:
一、卸載node-sass
運行:npm uninstall node-sass
二、從新安裝指定的node-sass版本(安裝失敗的版本)
運行:npm install node-sass@4.9.3
三、若是仍是安裝不成功的話,或者安裝太慢鏈接不上,使用一下淘寶鏡像後重復1,2步驟,成功後再npm install
使用淘寶鏡像運行:npm config set registry https://registry.npm.taobao.org
node