npm安装eccrypto,抛出构建错误:Windows 10

时间:2019-08-01 16:39:10

标签: windows npm node-gyp

自3天以来,我一直尝试安装此npm模块“ eccrypto”(nodejs v10,npm v6):但我总是遇到此错误:

node-gyp rebuild


C:\Users\mdbouba\maroodb\hannibal\bct-api\node_modules\secp256k1>if not defined npm_config_node_gyp (node "C:\Users\mdbouba\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
'.' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
gyp: Call to './utils/has_lib.sh gmpxx && ./utils/has_lib.sh gmp' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\mdbouba\AppData\Roaming\nvm\v10.16.1\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.15063
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\mdbouba\maroodb\hannibal\bct-api\node_modules\secp256k1
gyp ERR! node -v v10.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! secp256k1@2.0.4 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the secp256k1@2.0.4 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mdbouba\AppData\Roaming\npm-cache\_logs\2019-08-01T16_35_10_320Z-debug.log

> eccrypto@1.1.1 install C:\Users\mdbouba\maroodb\hannibal\bct-api\node_modules\eccrypto
> node-gyp rebuild || exit 0


C:\Users\mdbouba\maroodb\hannibal\bct-api\node_modules\eccrypto>if not defined npm_config_node_gyp (node "C:\Users\mdbouba\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Génération des projets individuellement dans cette solution. Pour activer la génération en parallèle, ajoutez le commutateur "/m".
  ecdh.cc
  win_delay_load_hook.cc
     Creating library C:\Users\mdbouba\maroodb\hannibal\bct-api\node_modules\eccrypto\build\Release\ecdh.lib and object C:\Users\mdbouba\maroodb\hannibal\bct-api\node_modules\eccrypto\build\Release\ecdh.exp
ecdh.obj : error LNK2001: unresolved external symbol EC_POINT_set_compressed_coordinates_GFp [C:\Users\mdbouba\maroodb\hannibal\bct-api\node_modules\eccrypto\build\ecdh.vcxproj]
C:\Users\mdbouba\maroodb\hannibal\bct-api\node_modules\eccrypto\build\Release\ecdh.node : fatal error LNK1120: 1 unresolved externals [C:\Users\mdbouba\maroodb\hannibal\bct-api\node_modules\eccrypto\build\ecdh.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:\Users\mdbouba\AppData\Roaming\nvm\v10.16.1\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.15063
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\mdbouba\maroodb\hannibal\bct-api\node_modules\eccrypto
gyp ERR! node -v v10.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN hannibal-backend@1.0.0 No description
npm WARN hannibal-backend@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: secp256k1@2.0.4 (node_modules\secp256k1):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: secp256k1@2.0.4 install: `npm run rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

我尝试了这些解决方案:

  • 安装Windows-build-tools
  • 安装Visual Studio
  • 重新安装nodejs
  • npm配置设置msvs_version 2015 --global ...

0 个答案:

没有答案