问题描述:
遇到一个Vue3的项目,发现需要升级node才能运行,于是升级至v14.15.1
后面运行原项目时,出现报错:
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (83)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.12.0
得出结论:
查阅相关资料后得出:运行环境发生改变后,依赖需要重新绑定。
解决方法:
npm rebuild node-sass
npm update
备注:
执行命令后,项目运行正常。
使用yarn upgrade代替npm undate时,依然报错