【现象】
npm WARN The package connect is included as both a dev and production dependency.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@7.0.1 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@7.0.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\86183\AppData\Roaming\npm-cache_logs\2022-06-28T08_23_00_917Z-debug.log
【解决方法】
可通过配置淘宝的镜像源解决,首先配置淘宝的镜像源
npm config set registry https://registry.npm.taobao.org
然后在 ~/.npmrc 加入下面内容
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
.npmrc 文件位于
win:C:\Users\[你的账户名称]\.npmrc
linux:直接使用 vi ~/.npmrc
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://onefire.blog.csdn.net/article/details/125505265
内容来源于网络,如有侵权,请联系作者删除!