node升级后,项目中的node-sass报错的问题
node v8.x 更新后 node v10.x,vue启动的时候就报错
···
Module build failed: Error: Missing binding G:\myCode\YB\clientapps\AccountV4\node_modules_node-sass@4.9.0@node-sass\vendor\win32-x64-64\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 10.x
Found bindings for the following environments:
Windows 64-bit with Node.js 8.x
需要重装node-sass包
···
npm rebuild node-sass
···
安装完重新启动就ok了, 所以没事还是别更新node,最好保持团队的环境一致~
本文解决了一个常见的问题:当Node.js从8.x版本升级到10.x版本后,项目中使用node-sass模块出现的环境不匹配错误。通过重建node-sass模块,成功解决了Vue项目启动时报错的问题。
1万+

被折叠的 条评论
为什么被折叠?



