• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

npm install各种报错的解决方案

武飞扬头像
刘杨造梦程序开发建站
帮助1

npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! node-sass@3.8.0 postinstall: `node scripts/build.js`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the node-sass@3.8.0 postinstall script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

原因:因为被墙的原因导致node-sass安装失败

解决方案:更换淘宝镜像源

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

之后npm install 就可以了 如果还是报错那么就 npm uninstall node-sass然后再进行npm install

npm run serve Syntax Error: Error: Node Sass version 7.0.0 is incompatible with ^4.0.0.

原因:node-sass版本不符

解决方案:先卸载node-sass 

npm uninstall node-sass

然后根据提示安装对应的node-sass版本,node- sass版本与node版本对应关系如下 ,版本不对应请降级node 重新安装指定版本号:npm install node-sass@4.14.1   4.14.1换成你要的版本号

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgfheai
系列文章
更多 icon
同类精品
更多 icon
继续加载