使用npm install安装项目依赖的时候报错:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
意思是找不到sass,查看node-sass文件,里面没有文件。
所以在npm install前设置sass源。
解决方案:直接在当前目录下进行node-sass 的数据源设置
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
//然后重新安装依赖
npm install
//运行程序
npm run dev