node_modules\node-sass: Command failed.错误解决

error C:\javatest\ant-design-jeecg-vue\node_modules\node-sass: Command failed.

  • 查了两天,最后解决方案:
  1. 删掉:下面目录中划红线的配置文件:删掉项目中的node_modules,重新配置npm和yarn,然后执行命令就好了
  2. 用admin权限执行:
    npm config set registry https://registry.npm.taobao.org --global
    npm config set disturl https://npm.taobao.org/dist --global
    
    yarn config set registry https://registry.npm.taobao.org --global
    yarn config set disturl https://npm.taobao.org/dist --global
  3. 按照这个方法安装(先安装node.js,再安装yarn):
    
    https://yarnpkg.com/zh-Hans/docs/install#windows-stable
    https://www.jianshu.com/p/03a76b2e7e00
  4. 最后执行: yarn install

     

  •  其他解决方案1:
npm install node-sass@4.12.0

链接地址: https://stackoverflow.com/questions/45801457/node-js-python-not-found-exception-due-to-node-sass-and-node-gyp

 

 

  • 其他解决方案2(对我没用)链接地址:
  1. https://learnku.com/laravel/t/7619/resolved-laravel-mix-still-try-installing-heavy-please-help-look-laoniao-thank-you 
  2. https://learnku.com/articles/5083/on-the-record-of-installing-the-node-sass-error

 

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值