node升级之后导致vue项目打不开,node-sass版本错误

node升级之后,vue项目启动就报错
报错内容:
Found bindings for the following environments: Windows 64-bit with Node.js 8.x
This usually happens because your environment has changed since running npm install

根据提示,是要重新构建node-sass,所以执行下面的命令:

npm rebuild node-sass

如果还是不行,重新安装node-sass

npm install node-sass@4.14.1

所以node还是不要随意更新
最后发现下载总是报错,一直无法安装这个版本,读了报错日志,才发现提示的错误:
yorkie: Command failed.
在这里插入图片描述
解决方法:
卸载淘宝镜像

npm config delete registry

再重新安装

npm install node-sass@4.14.1

npm run dev启动项目… 成功!


版权声明:本文为u_ndefine_d原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。