Electron在构建时失败,退出代码为255

时间:2017-03-29 11:07:43

标签: node.js macos electron electron-builder

对不起那么具体的标题" :笑脸: 我试图用电子版本打包我的应用程序,但它让我阻止了构建,抛出了这个错误:

Error: /usr/local/Cellar/node/7.7.4/bin/node exited with code 1
Output:

> ursa@0.9.4 install /Users/gaetano/Desktop/sqlite/node_modules/ursa
> node-gyp rebuild

  CXX(target) Release/obj.target/ursaNative/src/ursaNative.o

Error output:
In file included from ../src/ursaNative.cc:3:
../src/ursaNative.h:13:10: fatal error: 'openssl/rsa.h' file not found
#include <openssl/rsa.h>
         ^
1 error generated.
make: *** [Release/obj.target/ursaNative/src/ursaNative.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/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:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.4.0
gyp ERR! command "/usr/local/Cellar/node/7.7.4/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/gaetano/Desktop/sqlite/node_modules/ursa
gyp ERR! node -v v7.7.4
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok 

npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/Cellar/node/7.7.4/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "rebuild" "ursa"
npm ERR! node v7.7.4
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
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 '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 ursa 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 ursa
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ursa
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/gaetano/Desktop/sqlite/npm-debug.log

    at ChildProcess.childProcess.once.code (/Users/gaetano/Desktop/sqlite/node_modules/electron-builder-util/src/util.ts:134:14)
    at Object.onceWrapper (events.js:293:19)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at maybeClose (internal/child_process.js:899:16)
    at Socket.<anonymous> (internal/child_process.js:342:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at Pipe._handle.close [as _onclose] (net.js:513:12)
From previous event:
    at spawn (/Users/gaetano/Desktop/sqlite/node_modules/electron-builder-util/src/util.ts:97:3)
    at /Users/gaetano/Desktop/sqlite/node_modules/electron-builder/src/yarn.ts:118:11
    at Generator.next (<anonymous>)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)

我认为这是node-gyp的一个错误,所以我尝试将int安装为全局包,没有运气。 阅读所有这些奇怪的错误,我看到它与ursa模块有关,可能是吗?!

任何帮助都是赞成的:笑脸:

0 个答案:

没有答案