ndoe项目安装ursa模块遇到问题

接手一个node项目,开发的node版本0.1.2,现在用版本改成了8.10.0。

安装ursa 模块出现问题。

> ursa@0.9.4 install D:\nodeNew\node_modules\ursa
> node-gyp rebuild


D:\nodeNew\node_modules\ursa>if not defined npm_config_node_gyp (node "D:\nodeNew\Lib\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "D:\nodeNew\Lib\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
  ursaNative.cc
  win_delay_load_hook.cc
..\src\ursaNative.cc(157): warning C4244: “参数”: 从“ssize_t”转换到“int”,可能丢失数
据 [D:\nodeNew\node
_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(172): warning C4244: “参数”: 从“ssize_t”转换到“int”,可能丢失数
据 [D:\nodeNew\node
_modules\ursa\build\ursaNative.vcxproj]
LINK : fatal error LNK1181: 无法打开输入文件“C:\OpenSSL-Win64\lib\libeay32.lib” [D:\nodeN
ew\node_m
odules\ursa\build\ursaNative.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\nodeNew\Lib\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.17134
gyp ERR! command "D:\\nodeNew\\node.exe" "D:\\nodeNew\\Lib\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\nodeNew\node_modules\ursa
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
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\qiu_lijun\AppData\Roaming\npm-cache\_logs\2018-06-20T06_02_36_280Z-debug.log

我想说nodel凉真是太好了!!!!!!!!


鬼知道中间发啥变化了。高版本和低版本兼容这么诡异。上网搜不到,旺哥又要我接手。so去了你npm的官网看了ursa。

小哥哥点我

npm官网真的很不错,我对自己英语有些B数所以翻译了,还能看的懂。


你要安装ursa需要达成两个前置条件

  1. 安装一个协议OpenSSL
  2. 需要安装node-gyp模块。

安装openSSl协议自己百度下载。安装后生成公钥和私钥->l小哥哥点我

找个时候我要说下为啥mac、linux 安装ursa没问题,windows不行。因为那俩系统自带openssl协议。

安装node-gyp协议应该没什么问题。

后来安装ursa时说找不到C:\OpenSSL-Win64\lib\libeay32.lib 在C:\OpenSSL-Win32\lib下copy了一个解决了。

其实在报错中显示了没有安装openssl协议,但是那个日志鬼能看的懂。一脸懵逼。


项目启动起来了!

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值