最近项目是要从内网开发,这时候是没法使用
npm install 和 npm rebuild等命令
而且开发电脑是32位的而 本人的电脑(外网)是64位
开启项目时从而出现
Module build failed: Error: Missing binding C:\Users\Administrator\Desktop\jdqb\
jdqbmin\jdqbmin\web\node_modules\node-sass\vendor\win32-ia32-48\binding.node
Node Sass could not find a binding for your current environment: Windows 32-bit
with Node.js 6.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 6.x
This usually happens because your environment has changed since running `npm ins
tall`.
Run `npm rebuild node-sass --force` to build the binding for your current enviro
nment.
等错误
此处已经提示尝试运行 npm rebuild node-sass --force的命令但是此只能在外网中运行
真正的错误来源于:
Module build failed: Error: Missing binding C:\Users\Administrator\Desktop\jdqb\
jdqbmin\jdqbmin\web\node_modules\node-sass\vendor\win32-ia32-48\binding.node;
不能读取win32-ia32-48模块当我跟着目录查看根本就没有win32-ia32-48的文件夹以及此处的node模块;
此时可以去https://github.com/sass/node-sass/releases/下载相应的binding.node模块
并把相应的目录改好
例如进入项目 node_modules\node-sass\vendor\win32-ia32-48(相应的目录模块)\binding.node
外网的童鞋可以去参考 http://blog.csdn.net/zhu1500527791/article/details/53444870