vue项目遇到的问题

1.从网上git下来后,运行时出现

npm WARN EBADENGINE package: '@achrinza/node-ipc@9.2.2', npm WARN EBADENGINE required: { node: '8 || 10 || 12 || 14 || 16 || 17' }, npm WARN EBADENGINE current: { node: 'v18.15.0', npm: '9.5.0' } npm WARN EBADENGINE }

原因:node.js版本不匹配

解决:卸载重装

How to completely remove node.js from Windows - Stack Overflow

2.重装node.js后运行出现

npm ERR! gyp verb check python checking for Python executable "C:\Users\fang\AppData\Local\Microsoft\WindowsApps\python.exe" in the PATH npm ERR! gyp verb `which` failed Error: not found: C:\Users\fang\AppData\Local\Microsoft\WindowsApps\python.exe

解决:cmd 运行where python.exe,然后根据出现的地址重新set

C:\Users\fang>set PYTHON=D:\Program Files\Python311\python.exe\python.exe

3.npm ERR! path D:\mall-admin-web\node_modules\node-sass

解决方法:

npm install -g node-gyp

更新node-gyp:您正在使用的node-gyp版本(v3.8.0)非常旧,可能与您的Node.js版本(v16.0.0)不完全兼容。执行以下命令将node-gyp更新为最新版本:
npm uninstall node-sass

更新node-sass: node-sass包已弃用,取而代之的是sass。卸载node-sass并安装sass:
npm install sass

重新运行npm install:完成以上步骤后,在你的项目目录下重新运行npm install。
这些步骤应该可以解决问题,并允许您成功地为sass包构建本机扩展。

node-sass 下载失败 解决方案 · Issue #24 · PanJiaChen/vue-element-admin (github.com)

 

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值