0

nodemeteor mup deploy.

当我运行mup deploy from my Github Action` 时,我收到以下错误消息 -

Run cd meteor-api/.deploy/staging && mup deploy
Building App Bundle Locally
discarding invalid livedata message { testMessageOnConnect: true }

Started TaskList: Pushing Meteor App
[13.xxx.xxx.xxx] - Pushing Meteor App Bundle to the Server
[13.xxx.xxx.xxx] - Pushing Meteor App Bundle to the Server: SUCCESS
[13.xxx.xxx.xxx] - Prepare Bundle
[13.xxx.xxx.xxx] x Prepare Bundle: FAILED
    
          ------------------------------------STDERR------------------------------------
          The command '/bin/sh -c cd /built_app/programs/server &&     npm install --unsafe-perm' returned a non-zero code: 1
    
    real    0m50.190s
    user    0m1.996s
    sys 0m1.394s
    
          ------------------------------------STDOUT------------------------------------
          e_modules/nodemailer
    > node -e "try{require('./postinstall')}catch(e){}"
    
    nodemailer@6.4.6 /built_app/programs/server/npm/node_modules/meteor/email/node_modules/nodemailer
    stream-buffers@3.0.2 /built_app/programs/server/npm/node_modules/meteor/email/node_modules/stream-buffers
    
    > node-libcurl@2.2.0 install /built_app/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/node-libcurl
    > node-pre-gyp install --fallback-to-build
    
    node-pre-gyp WARN Using request for node-pre-gyp https download 
    node-pre-gyp WARN Tried to download(404): https://github.com/JCMais/node-libcurl/releases/download/v2.2.0/node_libcurl-v2.2.0-node-v46-linux-x64-glibc.tar.gz 
    node-pre-gyp WARN Pre-built binaries not found for node-libcurl@2.2.0 and node@4.8.7 (node-v46 ABI, glibc) (falling back to source compile with node-gyp) 
    /built_app/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/env-paths/index.js:7
    const {env} = process;
          ^
    
    SyntaxError: Unexpected token {
        at exports.runInThisContext (vm.js:53:16)
        at Module._compile (module.js:373:25)
        at Object.Module._extensions..js (module.js:416:10)
        at Module.load (module.js:343:32)
        at Function.Module._load (module.js:300:12)
        at Module.require (module.js:353:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/node-gyp/bin/node-gyp.js:7:18)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
    node-pre-gyp ERR! build error 
    node-pre-gyp ERR! stack Error: Failed to execute '/opt/nodejs/bin/node /built_app/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/node-gyp/bin/node-gyp.js clean' (1)
    node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/built_app/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
    node-pre-gyp ERR! stack     at emitTwo (events.js:87:13)
    node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
    node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:862:16)
    node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
    node-pre-gyp ERR! System Linux 5.8.0-1041-aws
    node-pre-gyp ERR! command "/opt/nodejs/bin/node" "/built_app/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
    node-pre-gyp ERR! cwd /built_app/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/node-libcurl
    node-pre-gyp ERR! node -v v4.8.7
    node-pre-gyp ERR! node-pre-gyp -v v0.15.0
    node-pre-gyp ERR! not ok 
    Failed to execute '/opt/nodejs/bin/node /built_app/programs/server/npm/node_modules/meteor/ostrio_files/node_modules/node-gyp/bin/node-gyp.js clean' (1)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! node-libcurl@2.2.0 install: `node-pre-gyp install --fallback-to-build`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the node-libcurl@2.2.0 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!     /root/.npm/_logs/2021-08-14T12_16_55_144Z-debug.log
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! meteor-dev-bundle@ install: `node npm-rebuild.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the meteor-dev-bundle@ 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!     /root/.npm/_logs/2021-08-14T12_16_55_168Z-debug.log
    
          ------------------------------------------------------------------------------
          
Error: Process completed with exit code 1.

meteor node -vv12.22.1

meteor npm -v的是6.14.12

有谁知道如何解决这个问题?

4

2 回答 2

1

您在 github 操作运行器上使用旧的 node.js 版本:

    node-pre-gyp ERR! node -v v4.8.7

此版本不适用于任何最近的流星版本。确保在运行器上安装节点 12(最好与您的版本完全相同meteor node)。但是鉴于您已经使用此设置发布了多少问题(在 github 操作上运行 meteor-up),我强烈建议您只在您的开发机器上运行 meteor-up。这就是它的目的。

或者,我已经取得了很好的经验,只是meteor build在 github 操作中运行官方,上传生成的工件,将其下载到生产实例上的自托管运行器上,在那里解压并运行包含的 README.me 中描述的设置步骤文件在那里。

于 2021-08-15T00:45:31.993 回答
0

我假设您正在使用旧图像来构建您的应用程序。

查看 MUP 的可用图像:http: //meteor-up.com/docs.html#meteor-support

实际上我正在使用zodern/meteor:root图像。

于 2021-08-16T20:41:46.877 回答