strongloop安装在Windows 10时,Visual Studio 2015年社区
问题描述:
我有以下环境strongloop安装在Windows 10时,Visual Studio 2015年社区
**OS**: Windows 10
**Visual Studio** : 2015 community edition
**NodeJS** : v0.12.0
**Python** : 2.7.10
我试图安装,strongloop用下面的命令。
npm install -g strongloop
不幸的是,它与下面的错误而失败。
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(344,5):
warning MSB8003: Could not find WindowsSDKDir variable from the registry.
TargetFrameworkVersion or PlatformToolset may be set to an invalid version
number. [C:\Users\xxx\App Data\Roaming\npm\node_modules\strongloop\node_modules\strong-supervisor\node_modules\heapdump\build\addon.vcxproj]
heapdump.cc
c:\users\xxx\.node-gyp\0.12.0\deps\v8\include\v8stdint.h(10): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
[C:\users\xxx\AppData\Roaming\npm\node_modules\strongloop\node_modules\strong-supervisor\node_modules\heapdump\build\addon.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` 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:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\xxx\AppData\Roaming\npm\node_modules\strongloop\node_modules\strong-supervisor\node_modules\heapdump
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
我尝试安装使用替代命令
npm install -g strongloop --msvs_version=2015
,但同样具有以下错误而失败。
customFds option is deprecated, use stdio instead.
Traceback (most recent call last):
**(More stack trace)**
versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
KeyError: '2015'
我找不到关于这个问题的很多信息,几乎卡在这里。
答
这似乎是与旧版本的节点和节点GYP一个问题,您正在使用:https://github.com/nodejs/node-gyp/issues/555
这也可能是相关的:如果你是卡在v0.12 http://www.serverpals.com/blog/building-using-node-gyp-with-visual-studio-express-2015-on-windows-10-pro-x64
,你至少应该升级到v0.12.7,否则我强烈建议从https://nodejs.org/en/download/(目前为v4.2.1)升级到最新的LTS版本。