windows 10上的strongloop安装,视觉工作室社区2015

时间:2015-11-02 07:47:45

标签: node.js visual-studio-2015 windows-10 strongloop

我有以下环境

**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'

我找不到有关此问题的更多信息,几乎卡在这里。

1 个答案:

答案 0 :(得分:0)

您正在使用的旧版Node和node-gyp似乎存在问题:https://github.com/nodejs/node-gyp/issues/555

这也可能是相关的:http://www.serverpals.com/blog/building-using-node-gyp-with-visual-studio-express-2015-on-windows-10-pro-x64

如果您坚持使用v0.12,则至少应该升级到v0.12.7,否则我强烈建议从https://nodejs.org/en/download/升级到最新的LTS版本(目前为v4.2.1)。