繁体   English   中英

在节点 npm 上安装 URSA 时遇到问题

[英]Having issues with installing URSA on node npm

我在这里尝试了所有方法 --> NodeJS - 使用 NPM 安装时出错

但我似乎无法得到这个工作。 每当我尝试 npm install --save ursa 时,它都会失败。

我的错误是-->

C:\Users\Journey\Desktop\Encrypt\node_modules\ursa>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\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 )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  ursaNative.cc
  win_delay_load_hook.cc
..\src\ursaNative.cc(157): warning C4244: 'argument': conversion from 'ssize_t' to 'int', possible loss of data [C:\Users\Journey\Desktop\Encrypt\node_modul es\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(172): warning C4244: 'argument': conversion from 'ssize_t' to 'int', possible loss of data [C:\Users\Journey\Desktop\Encrypt\node_modul es\ursa\build\ursaNative.vcxproj]
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\Users\Journey\Desktop\Encrypt\node_modules\ursa\build\ursaNative. 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:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
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\Journey\Desktop\Encrypt\node_modules\ursa
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN encrypt@1.0.0 No description
npm WARN encrypt@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ursa@0.9.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ursa@0.9.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Journey\AppData\Roaming\npm-cache\_logs\2018-04-05T01_48_33_626Z-debug.log

关注节点 gyp

以 admin 身份运行这些。

npm install --g --production windows-build-tools
npm install --global node-gyp

我有同样的问题。 我在此链接上找到了解决方案

https://github.com/JoshKaufman/ursa/pull/169

暂无
暂无

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

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