前端vue框架,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.
版本:
node:v14.16.1;npm:6.14.12
所以与网上说的版本过高问题不符。
最后的解决方案是在当前目录下对node-sass进行数据源设置
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
然后重新执行install命令 成功。