错误展示
错误结果:
下面是一些相关的错误信息:
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.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User_rzn\AppData\Roaming\npm-cache\_logs\2020-08-15T16_40_17_396Z-debug.log
解决办法
第一步
执行命令(目的:安装淘宝镜像):
npm install -g cnpm --registry=https://registry.npm.taobao.org
第二步
执行命令(使用cnpm重装):
cnpm install node-sass --save-dev
结果如下:
第三步
执行命令:
cnpm install sass-loader --save-dev
结果如下:
到此为止,安装sass-loader成功。可以处理less文件。
不用去使用npm install sass-loader node-sass -D
这个命令。
楠哥-------一心想为IT行业添砖加瓦,却总是面向cv编程的程序员。
谢谢阅读,无误点赞,有误还望评论区指正。