您好我安装了loopback-cli。 运行这些命令: npm install --global --production windows-build-tools 和 npm install -g loopback-cli
第二个命令运行将ursa模块重建为错误。有一些链接到C:\ OpenSSL-Win64。这是什么......一些硬编码的图书馆链接?
请以某种方式写信给我如何正常安装环回。这是来自他们的安装站点。感谢名单。
这里是日志:
C:\Users\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa>if not defined npm_config_node_gyp (node "C:\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" 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:\Use
rs\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa\build\ursaNative.vcxproj]
..\src\ursaNative.cc(172): warning C4244: 'argument': conversion from 'ssize_t' to 'int', possible loss of data [C:\Use
rs\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa\build\ursaNative.vcxproj]
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\Users\Erik\AppData\Roaming\n
pm\node_modules\loopback-cli\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:\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.15063
gyp ERR! command "C:\\nodejs\\node.exe" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Erik\AppData\Roaming\npm\node_modules\loopback-cli\node_modules\ursa
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ursa@0.9.4 (node_modules\loopback-cli\node_modules\ursa):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ursa@0.9.4 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ loopback-cli@4.0.0
added 3 packages and updated 1 package in 27.638s
答案 0 :(得分:0)
同一问题。
修复前的设置:
C:\OpenSSL-Win64
中安装OpenSSL 1.1(strong-ursa对该位置进行硬编码)C:\OpenSSL-Win64\lib
的{{1}}中创建一个以libeay64.lib
为目标的符号链接。libcrypto.lib
npm i -g windows-build-tools
。我不确定是否需要将NodeJS版本回滚到8.12。由于强大的ursa对本机库的使用,存在一些广泛的,尽管没有充分记录的痛点与Loopback一起使用。 (请注意,这是未经确认的信息,因为我急于重新开发手头的项目。)这些步骤使我可以不受阻碍地继续使用Loopback CLI。
有用的链接:
npm i -g looback-cli
:https://github.com/felixrieseberg/windows-build-tools