根据官网安装完相关的软件Python \VS\SDK 等node
仍报错,以下显示git
E:\git\fans\node_modules\bufferutil>if not defined npm_config_node_gyp (node "D: \Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node -gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。 bufferutil.cc C:\Users\yi\.node-gyp\5.3.0\include\node\v8.h(336): error C2988: 不可识别的模板 声明/定义 [ E:\git\fans\node_modules\bufferutil\build\bufferutil.vcxproj] C:\Users\yi\.node-gyp\5.3.0\include\node\v8.h(336): error C2059: 语法错误:“usin g” [
只要执行下面代码就行,后面数字是你安装的vs的版本号 npm install --msvs_version=2013
若是以前有安装过nodejs就版本,有从新安装了新版本,把旧版本覆盖了。得把旧版本的全局代码库删掉,有可能报错npm
参考http://stackoverflow.com/questions/21562038/node-gyp-build-error-windows-x64windows