关于 linux 下 node_modules\node-sass\vendor 的报错解决方法
VUE工程在linux上启动时遇到了下面的问题:
ERROR in Missing binding /root/component/node_modules/node-sass/vendor/linux-x64-48/binding.node
[1] Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x
[1]
[1] Found bindings for the following environments:
[1] - Linux 64-bit with Node.js 4.x
[1]
[1] This usually happens because your environment has changed since running `npm install`.
[1] Run `npm rebuild node-sass` to build the binding for your current environment.
解决办法
At first going into project folder. Then write bellow code
npm rebuild node-sass --> Enter
另外一种情况,在启动时提示binding.node文件与系统环境不匹配。
解决办法:
下载与系统环境对应版本的二进制文件 binding.node,然后找到该文件对应的位置进行替换。然后重新启动。
另附binding.node文件的git地址作为参考:https://github.com/sass/node-sass/releases/tag/v4.9.3