简体   繁体   English

在Windows 10上安装Strongloop,Visual Studio Community 2015

[英]strongloop installation on windows 10, visual studio community 2015

I have following environment 我有以下环境

**OS**: Windows 10
**Visual Studio** : 2015 community edition
**NodeJS** : v0.12.0
**Python** : 2.7.10

I am trying to install, strongloop with following command. 我正在尝试使用以下命令安装Strongloop

npm install -g strongloop

Unfortunately, it is failing with following error. 不幸的是,它失败并出现以下错误。

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

I tried installing using an alternative command as 我尝试使用替代命令进行安装

npm install -g strongloop --msvs_version=2015

But that too failed with following error. 但这也因以下错误而失败。

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'

I couldn't find much information about this problem and almost stuck here. 我找不到有关此问题的太多信息,并且几乎停留在这里。

It appears to be a problem with the old version of Node and node-gyp you are using: https://github.com/nodejs/node-gyp/issues/555 您使用的旧版本的Node和node-gyp似乎存在问题: https : //github.com/nodejs/node-gyp/issues/555

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

If you are stuck on v0.12, you should at least upgrade to v0.12.7, otherwise I highly recommend upgrading to the latest LTS release from https://nodejs.org/en/download/ (v4.2.1 at the moment). 如果您坚持使用v0.12,则至少应升级到v0.12.7,否则我强烈建议从https://nodejs.org/en/download/ (当前为v4.2.1)升级到最新的LTS版本。 。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM