【问题标题】:node error message during meteor mup deploy流星 mup 部署期间的节点错误消息
【发布时间】:2021-10-17 13:08:34
【问题描述】:

我在meteor mup deploy 期间收到许多node 错误消息。

当我运行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 -v 是v12.22.1

而我的meteor npm -v 是6.14.12

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

【问题讨论】:

    标签: node.js npm meteor node-modules mup


    【解决方案1】:

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

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

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

    另外,我在 github 操作中运行官方 meteor build,上传生成的工件,将其下载到生产实例上的自托管运行器上,在那里解压缩并运行所描述的设置步骤,从而获得了很好的体验在包含的 README.me 文件中。

    【讨论】:

      【解决方案2】:

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

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

      其实我用的是zodern/meteor:root图片。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-09-17
        • 2016-10-12
        • 2017-12-09
        • 2017-06-06
        • 2017-08-05
        • 2015-09-10
        • 2015-11-01
        相关资源
        最近更新 更多