流星构建中的节点和 docker 图像错误

node and docker image error in meteor build

我是 运行 Github Actionbuilddeploy meteor ApplicationAWS EC2 实例。

我在 .yaml file 中使用以下代码来执行 mup deploy

- name: mup deploy
  run: cd meteor-api/.deploy/staging && mup deploy

但我在下面收到此错误消息 -

Run cd meteor-api/.deploy/staging && mup deploy
Building App Bundle Locally

Started TaskList: Pushing Meteor App
[13.xx.xxx.xxx] - Pushing Meteor App Bundle to the Server
[13.xx.xxx.xxx] - Pushing Meteor App Bundle to the Server: SUCCESS

Started TaskList: Configuring App
[13.xx.xxx.xxx] - Pushing the Startup Script
[13.xx.xxx.xxx] - Pushing the Startup Script: SUCCESS
[13.xx.xxx.xxx] - Sending Environment Variables
[13.xx.xxx.xxx] - Sending Environment Variables: SUCCESS

Started TaskList: Start Meteor
[13.xx.xxx.xxx] - Start Meteor
[13.xx.xxx.xxx] - Start Meteor: SUCCESS
[13.xx.xxx.xxx] - Verifying Deployment
[13.xx.xxx.xxx] x Verifying Deployment: FAILED
    
          ------------------------------------STDERR------------------------------------
          remove-undefined
    babel-plugin-transform-simplify-comparison-operators@6.9.4 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-simplify-comparison-operators
    babel-plugin-transform-undefined-to-void@6.9.4 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/babel-plugin-transform-undefined-to-void
    meteor-babel-helpers@0.0.3 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/meteor-babel-helpers
    reify@0.20.12 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/reify
    acorn@6.4.2 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/acorn
    acorn-dynamic-import@4.0.0 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/acorn-dynamic-import
    magic-string@0.25.7 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/magic-string
    sourcemap-codec@1.4.8 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/sourcemap-codec
    semver@5.7.1 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/reify/node_modules/semver
    typescript@4.3.2 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/typescript
    json5@2.1.1 /home/node/bundle/programs/server/npm/node_modules/meteor/babel-compiler/node_modules/json5
    
    > core-js@3.14.0 postinstall /home/node/bundle/programs/server/npm/node_modules/meteor/url/node_modules/core-js
    > node -e "try{require('./postinstall')}catch(e){}"
    
    core-js@3.14.0 /home/node/bundle/programs/server/npm/node_modules/meteor/url/node_modules/core-js
    
    > bcrypt@5.0.1 install /home/node/bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/bcrypt
    > node-pre-gyp install --fallback-to-build
    
    /home/node/bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:78
    function Run({ package_json_path = './package.json', argv }) {
                 ^
    
    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> (/home/node/bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/@mapbox/node-pre-gyp/lib/main.js:9:22)
        at Module._compile (module.js:409:26)
        at Object.Module._extensions..js (module.js:416:10)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! bcrypt@5.0.1 install: `node-pre-gyp install --fallback-to-build`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the bcrypt@5.0.1 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!     /home/node/.npm/_logs/2021-08-16T18_06_57_777Z-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!     /home/node/.npm/_logs/2021-08-16T18_06_57_793Z-debug.log
    => Found /bundle
    => Bundle Version
     > METEOR@2.3.4
    => Proper Node Version
    Hmm... We're not sure which Node is compatible with METEOR@2.3.4!
    
    It's possible that this is a new (or very old) version of Meteor, but you
    should make sure you're using a Docker image that's compatible
    with your version of Meteor!
    
    Check which Docker images are available at:
    
      https://hub.docker.com/r/abernix/spaceglue/tags/
    
    and if you need support for this version, open an issue here:
    
      https://github.com/abernix/spaceglue/issues
    Unable to check valid version, newer?
    => Actual Node Version
     > 4.8.4
    => Executing NPM install within Bundle
     
    => Redeploying previous version of the app
     
    
          ------------------------------------STDOUT------------------------------------
          IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    IP: 172.xx.0.2
    => Container status:
    restarted: 2 times {"Bridge":"","SandboxID":"690104914df1f5f6fb5ea6d1ed4ca52772802d0e1498571a1b9c8c4e41688c27","HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{"3000/tcp":[{"HostIp":"0.0.0.0","HostPort":"3000"}]},"SandboxKey":"/var/run/docker/netns/690104914df1","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"b93f3ddcf6446495f586ecacc568beb580be0897d5343adf7bbdd47c529cd9f7","Gateway":"172.17.0.1","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"172.17.0.2","IPPrefixLen":16,"IPv6Gateway":"","MacAddress":"02:42:ac:11:00:02","Networks":{"bridge":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"a27a177b0cd529caaacf357d1f3a6067acf56757f41f3e7a10e9b210131e7a2b","EndpointID":"b93f3ddcf6446495f586ecacc568beb580be0897d5343adf7bbdd47c529cd9f7","Gateway":"172.17.0.1","IPAddress":"172.17.0.2","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:02","DriverOpts":null}}} {"Status":"running","Running":true,"Paused":false,"Restarting":false,"OOMKilled":false,"Dead":false,"Pid":526109,"ExitCode":0,"Error":"","StartedAt":"2021-08-16T18:06:58.516712865Z","FinishedAt":"2021-08-16T18:06:57.815488552Z"}
    
    To see more logs type 'mup logs --tail=200'
    
    
          ------------------------------------------------------------------------------
          
Error: Process completed with exit code 1.

现在正在使用node version 12.22.4。我应该使用最新的节点版本 14.17.3 吗?

还有 docker Image,目前我正在使用 image: 'abernix/spaceglue:node-4-onbuild,我应该使用哪个来消除这个错误呢?

图像取决于您使用的流星版本。

检查此 table:http://meteor-up.com/docs.html#meteor-support

我正在使用 zodern/meteor:root 和 meteor 2.2.1