0
点赞
收藏
分享

微信扫一扫

node版本升级后(vue)项目运行报错

at小涛 2022-01-24 阅读 130

@node版本升级后(vue)项目运行报错

问题描述

最近使用vu3把node版本从10.x升级到12.x,升级后vu3项目能正常启动,但是用vu2写的项目运行报错报错原因如下!
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Missing binding F:\mrj\fyFactory\node_modules\node-sass\vendor\win32-x64-72\binding.node
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 10.x
    大概意思就是在node12.x的环境下找不到当前项目sass的运行环境

解决方法

1.在当前项目中更新sass
npm rebuild node-sass
2.如果这种方法还是不能解决或者安装途中直接卡住不动(一般出现这种情况是项目非常老或者node版本差距太大),那么直接删除node_modules然后在npm i (我用的是npm)

举报

相关推荐

0 条评论