0
点赞
收藏
分享

微信扫一扫

npm i 初始化 node-sass 错误

年迈的代码机器 2022-02-17 阅读 99

弄了好半天才搞出来,先记录一下下

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安装时获取源的问题,修改sass安装的源。
解决办法:使用taobao的npm

npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass

回车后,再输入npm install就完美解决了。

npm install

搞定,希望能帮到更多的童鞋!

举报

相关推荐

0 条评论