俺在项目运行之前npm install 下载 node_modules 时 总是报错,发生了各种诡异的事情,比如node-sass包或里面的重要文件总是消失(???),node版本和node-sass版本即使匹配也不能下载,等等。
尝试以下方法:
错误:npm ERR! Failed at the node-sass@4.13.0 postinstall script
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.13.0 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.13.0 postinstall script.
node-sass 的数据源没设置:
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
重新 npm install
就好了!哈哈
