vue项目从node8.x升级到12.x后

升级node到12.x后,vue项目因node-sass环境变化报错。通过执行`npm i node-sass -D`或`cnpm i node-sass -D`解决。使用nvm安装node时,出现下载慢、路径问题,导致WebStorm中无法执行`node -v`。卸载重装node,清除nvm环境变量并重启电脑后问题解决。
开始使用低于vue-cli3创建的项目,在更新node到12.x后,项目运行不起来了,这个让我想起我刚使用react时,安装的依赖,过了半年后,项目也运行不起来,在这了记录下(时间:2019-10-24)

1.版本更新后报错

  • 更新node后,原来的vue项目的node Sass环境变了,导致项目跑不起来
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 12.x
Found bindings for the following environments:
  - Windows 64-bit with Node.js 8.x
  - Windows 64-bit with Node.js 12.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
  • 我开始以为是要执行这条命令npm rebuild node-sass,然后执行发现,他要我安装Python环境
 Error: Can't find Python executable "python", you can set the PYTHON env variable.
  • 然后我执行npm i node-sas
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值