【问题标题】:Issue installing strongloop on Windows 7在 Windows 7 上安装 strongloop 时出现问题
【发布时间】:2016-04-25 04:00:40
【问题描述】:

在尝试安装 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

我尝试过的事情:

  • 重新安装 gyp
  • 重新安装 Visual Studio 2012
  • 使用 Visual Studio 2015 安装 strongloop
  • 使用 Visual Studio 2013 安装 strongloop
  • 使用 Visual Studio 2010 安装 strongloop

有什么想法吗?其他人遇到过类似的问题吗?

注意:我可以运行 slc,但我无法知道一切是否正常。这不像是我可以忽略的警告。

【问题讨论】:

  • 尝试更新你的 Node-gyp 版本 npm install -g node-gyp
  • @bladefist 你确定整个安装失败了吗?错误消息是针对应该可选且不应导致安装失败的组件。
  • @RyanGraham 听起来你是对的。但是在gyp这样的重要组件中出现如此多的C编译错误很奇怪。现在看来 node-gyp 已正确安装。
  • 是的,不幸的是,对于模块作者来说,Windows 的开发和测试并不容易。结果是许多带有本机插件的流行模块无法在 Windows 上正确构建。好消息是其中很多都是可选的,并且有纯 JS 后备。

标签: visual-studio-2012 npm strongloop node-gyp npm-install


【解决方案1】:

这已经解决了问题。

第 1 步:
将 node-gyp 重新安装到最新版本:npm install -g node-gyp

第 2 步:
像这样再次运行 strongloop 安装:npm install -g strongloop --msvs_version=2012

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-02-26
    • 1970-01-01
    • 1970-01-01
    • 2012-03-02
    • 2010-12-03
    • 2011-10-19
    • 2014-07-23
    • 1970-01-01
    相关资源
    最近更新 更多