无法npm安装secp256k1

我已经通过堆栈溢出search其他有用的build议node-gyp以及在https://github.com/nodejs/node-gyp中讨论的先决条件,但仍有这种构build错误:

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:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gyp ERR! System Windows_NT 10.0.10586 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\bajor\Desktop\Development\hackathon-starter\node_modules\secp256k1 gyp ERR! node -v v6.3.0 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm ERR! Windows_NT 10.0.10586 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "rebuild" npm ERR! node v6.3.0 npm ERR! npm v3.10.3 npm ERR! code ELIFECYCLE npm ERR! secp256k1@3.1.0 rebuild: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the secp256k1@3.1.0 rebuild script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the secp256k1 package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs secp256k1 npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls secp256k1 npm ERR! There is likely additional logging output above. 

这是我的设置:

  • Windows 10 x64
  • 节点gyp全局安装
  • VS2015用C ++构build工具,Windows 8.1工具和SDKS,Windows 10 SDK
  • 具有PATH并为节点configuration的Python 2.7.12
  • Ran:npm config set msvs_version 2015
  • Ran:npm config set python C:\ Python27

当尝试其他需要node-gyp(例如node-sass)的软件包时,没有构build问题,但是对于secp256k1,我遇到了这个问题。

在错误发生之前,我也一直收到同样的警告:

 warning C4267: '=': conversion from 'size_t' to ' unsigned char', possible loss of data (compiling source file ..\src\secp256k1-src\s rc\secp256k1.c)