gpt4 book ai didi

node.js - 如何解决nexe编译代码2错误?

转载 作者:行者123 更新时间:2023-12-02 10:56:39 24 4
gpt4 key购买 nike

我正在尝试使用nexe(3.3.2)编译我的节点服务器,但是它一直失败。当我第一次尝试时,它说我需要使用脚本中包含的--build标志。该过程再次开始,编译了两个多小时,然后失败了。

我使用Homebrew升级了node和npm版本,但是没有用。我以为可能是我包含的文件夹的大小,但是即使我只包含server.js,它也会失败。

请问有人对我有什么想法吗?以下是最新日志文件的副本。

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/lib/node_modules/node/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using npm@6.14.4
3 info using node@v13.8.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle robson-callcentre@0.1.0~prebuild: robson-callcentre@0.1.0
6 info lifecycle robson-callcentre@0.1.0~build: robson-callcentre@0.1.0
7 verbose lifecycle robson-callcentre@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle robson-callcentre@0.1.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/darryllrobinson/Documents/projects/Source/fonebookeohcollections/server/node_modules/.bin:/usr/local/opt/openssl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
9 verbose lifecycle robson-callcentre@0.1.0~build: CWD: /Users/darryllrobinson/Documents/projects/Source/fonebookeohcollections/server
10 silly lifecycle robson-callcentre@0.1.0~build: Args: [ '-c', 'nexe server.js --build' ]
11 silly lifecycle robson-callcentre@0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle robson-callcentre@0.1.0~build: Failed to exec build script
13 verbose stack Error: robson-callcentre@0.1.0 build: `nexe server.js --build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:321:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:321:20)
13 verbose stack at maybeClose (internal/child_process.js:1026:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid robson-callcentre@0.1.0
15 verbose cwd /Users/darryllrobinson/Documents/projects/Source/fonebookeohcollections/server
16 verbose Darwin 19.4.0
17 verbose argv "/usr/local/lib/node_modules/node/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v13.8.0
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error robson-callcentre@0.1.0 build: `nexe server.js --build`
22 error Exit status 1
23 error Failed at the robson-callcentre@0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

最佳答案

我无法解决问题,所以我改用了pkg

关于node.js - 如何解决nexe编译代码2错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61672231/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com