尝试安装strongloop后,它发出了一些警告和错误。
用于安装的命令是:npm install -g strongloop
错误:
c:\users\yoel\.node-gyp\4.2.4\include\node\v8.h(336): error C2988: unrecognizable template declaration/definition [C:\Users\Yoel\AppData\Roaming\npm\node_modules\strongloop\node_modules\heapdump\build\addon.vcxproj]
c:\users\yoel\.node-gyp\4.2.4\include\node\v8.h(336): error C2059: syntax error : 'using' [C:\Users\Yoel\AppData\Roaming\npm\node_modules\strongloop\node_modules\heapdump\build\addon.vcxproj]
c:\users\yoel\.node-gyp\4.2.4\include\node\v8.h(576): error C2061: syntax error : identifier 'WeakCallbackType' [C:\Users\Yoel\AppData\Roaming\npm\node_modules\strongloop\node_mododules\heapdump\build\addon.vcxproj]
c:\users\yoel\.node-gyp\4.2.4\include\node\v8.h(915): error C2989: 'v8::HandleScope' : class template has already been declared as a non-class template [C:\Users\Yoel\AppData\Roaming\npm\node_modules\strongloop\node_modules\heapdump\build\addon.vcxproj]
.
.
.
等...... [许多相同的错误和其他一些错误]
这是错误日志表单builderror.log
:
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Yoel\AppData\Roaming\npm\node_modules\strongloop\node_modules\node-inspector\node_modules\ws
gyp ERR! node -v v4.2.4
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
我使用的是Node 4.2.4,Python 2.7.11和NPM 2.14.12
我尝试的事情:
有什么想法吗?还有其他人遇到类似问题吗?
注意:我能够运行slc,但我无法知道一切是否正常。它不像我可以忽略的警告。
答案 0 :(得分:0)
这解决了这个问题。
步骤1:
将node-gyp重新安装到最新版本:npm install -g node-gyp
步骤2:
再次运行strongloop安装:npm install -g strongloop --msvs_version=2012