前端 | node 版本升级后 vue 项目启动错误(node-sass sass-loader) | Vue2

在将Node版本从较低版本升级到16.0.0后,一个Vue2项目启动出现错误,主要涉及node-sass和sass-loader。错误类型包括依赖安装提示和项目运行失败。原因是高版本NodeJS与node-sass存在兼容性问题。解决方法是回退到兼容版本的node-sass,并确保正确执行npm install。
摘要由CSDN通过智能技术生成

前端 | node 版本升级后 vue 项目启动错误(node-sass sass-loader) | Vue2

前言

开始使用低于 vue-cli3 创建的项目,在更新node12.x 后,项目运行不起来了

问题描述

node 版本升级后旧的 vue 项目启动报错

  • 错误类型1
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.
  • 错误类型2

                
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Appleex

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值