无法在Elastic Beanstalk中上载Node.js应用程序

时间:2019-09-18 01:15:21

标签: node.js amazon-elastic-beanstalk

当尝试使用弹性beantalk部署node.js应用程序时,我遇到了一些问题。我手动压缩了文件夹,然后部署了该zip文件。

    Error: Cannot find module 'node-linux-x64/package.json'
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
      at Function.resolve (internal/modules/cjs/helpers.js:33:19)
      at ChildProcess.<anonymous> (/tmp/deployment/application/node_modules/node-bin-setup/index.js:18:27)
      at ChildProcess.emit (events.js:198:13)
      at maybeClose (internal/child_process.js:982:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
  npm WARN savingsanalytics-service@1.0.0 No repository field.

     npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! node@10.16.3 preinstall: `node installArchSpecificPackage`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the node@10.16.3 preinstall 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!     /tmp/.npm/_logs/2019-09-18T00_57_17_598Z-debug.log
  Running npm install:  /opt/elasticbeanstalk/node-install/node-v10.16.3-linux-x64/bin/npm
  Setting npm config jobs to 1
  npm config jobs set to 1
  Running npm with --production flag
  Failed to run npm install. Snapshot logs for more details.
  UTC 2019/09/18 00:57:17 cannot find application npm debug log at /tmp/deployment/application/npm-debug.log 

    Traceback (most recent call last):
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 695, in <module>
      main()
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 677, in main
      node_version_manager.run_npm_install(options.app_path)
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 136, in run_npm_install
      self.npm_install(bin_path, self.config_manager.get_container_config('app_staging_dir'))
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 180, in npm_install
      raise e
  subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v10.16.3-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError)
caused by: + /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install

  > node@10.16.3 preinstall /tmp/deployment/application/node_modules/node
  > node installArchSpecificPackage

    Traceback (most recent call last):
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 695, in <module>
      main()
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 677, in main
      node_version_manager.run_npm_install(options.app_path)
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 136, in run_npm_install
      self.npm_install(bin_path, self.config_manager.get_container_config('app_staging_dir'))
    File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 180, in npm_install
      raise e
  subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v10.16.3-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1 (Executor::NonZeroExitStatus)

0 个答案:

没有答案