【发布时间】:2018-04-12 12:40:24
【问题描述】:
我有一个 NodeJS 环境,运行一个非常简单且资源密集型的应用程序,它突然开始给我“运行 npm 安装失败”的问题。
这一切都是在我进行部署时开始的,部署的捆绑包与上一次成功部署完全相同 - 各方面都相同。但不知何故,它未能构建应用程序。我试过回滚,没有用。
如果我进行“环境重建”,它会神奇地起作用,那么如果我对环境做任何事情,比如更改最小的配置设置或进行部署(再次,与运行的捆绑包完全相同),它会给出我这个错误。
更糟糕的是:它根本没有给我关于问题的任何细节。它只是在命令执行中永远挂起,然后给我下面的错误消息。我什至尝试手动运行命令,结果是一样的。我不知道发生了什么,这是一个生产环境。
[2017-10-31T10:52:04.566Z] INFO [20105] - [Application update 1.3.0.797-sched@71/AppDeployStage0/AppDeployPreHook/50npm.sh] : Starting activity...
[2017-10-31T10:57:21.426Z] INFO [20105] - [Application update 1.3.0.797-sched@71/AppDeployStage0/AppDeployPreHook/50npm.sh] : Activity execution failed, because: + /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install
npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
Running npm install: /opt/elasticbeanstalk/node-install/node-v6.10.0-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 2017/10/31 10:57:20 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
【问题讨论】:
标签: node.js npm amazon-elastic-beanstalk