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启动项目… 成功!