【发布时间】:2019-02-22 02:28:50
【问题描述】:
过去两天我遇到了一个非常奇怪的问题。我正在尝试在 AWS 弹性 beanstalk 上部署我的 webpack nodejs 应用程序。 Environment Health 从 OK 变为 Degraded。我之前已经部署过很多次,但没有发生这样的问题。首先,查看日志:
/var/log/eb-activity.log
/opt/elasticbeanstalk/containerfiles/ebnode.py --action node-install 活动执行失败,因为:+ /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install
npm 错误!小路 /tmp/deployment/application/node_modules/grpc/node_modules/.bin/node-pre-gyp npm 错误!代码 EEXIST npm 错误!拒绝删除 /tmp/deployment/application/node_modules/grpc/node_modules/.bin/node-pre-gyp: 在外面 /tmp/deployment/application/node_modules/grpc/node_modules/node-pre-gyp 而不是链接
npm 错误!文件已存在: /tmp/deployment/application/node_modules/grpc/node_modules/.bin/node-pre-gyp npm 错误!把它移开,然后再试一次。 npm 错误!可以在以下位置找到此运行的完整日志:npm ERR! /tmp/.npm/_logs/2018-09-18T05_49_17_967Z-debug.log 运行 npm 安装: /opt/elasticbeanstalk/node-install/node-v8.9.3-linux-x64/bin/npm
将 npm config jobs 设置为 1 npm config jobs 设置为 1 Running npm 带有 --production 标志无法运行 npm install。快照日志 更多细节。 UTC 2018/09/18 05:49:17 找不到应用程序 npm 调试日志位于 /tmp/deployment/application/npm-debug.log 回溯(最近一次通话最后): 文件“/opt/elasticbeanstalk/containerfiles/ebnode.py”,第 695 行,在 主要的() 文件“/opt/elasticbeanstalk/containerfiles/ebnode.py”,第 677 行,在 main node_version_manager.run_npm_install(options.app_path) 文件“/opt/elasticbeanstalk/containerfiles/ebnode.py”,第 136 行,在 run_npm_install self.npm_install(bin_path, self.config_manager.get_container_config('app_staging_dir')) 文件“/opt/elasticbeanstalk/containerfiles/ebnode.py”,第 180 行,在 npm_install raise e subprocess.CalledProcessError: 命令'['/opt/elasticbeanstalk/node-install/node-v8.9.3-linux-x64/bin/npm', '--production', 'install']' 返回非零退出状态 1 (ElasticBeanstalk::ExternalInvocationError)
现在错误出在某些 node-gyp 模块上,相信我,我以前没有听说过。我正在尝试一个解决方案,以便我可以继续我的工作,因为在我的老板面前这对我来说确实是一个尴尬的情况。你的帮助可以让我摆脱这种情况。
谢谢
【问题讨论】:
-
你的问题解决了吗?
-
@Duda 是的,我解决了。这是一个节点模块问题。我降级了该特定模块的版本,它可以工作!!!
标签: node.js amazon-web-services npm