我想使用eb deploy
命令将我的PHP应用部署到Amazon Elastic Beanstalk。但是我的应用程序使用gulp来合并和压缩scss和js。
因此,我尝试在文件.ebextensios/03npm.config
中运行以下命令:
commands:
01-install-node:
command: "yum install nodejs npm --enablerepo=epel -y"
container_commands:
01-install-dependencies:
command: "npm install"
02-build:
command: "npm run build"
但最终我收到了这个错误。
[Instance: i-c7800103] Command failed on instance. Return code: 1 Output: (TRUNCATED)...ttps://registry.npmjs.org/acorn npm http 304 https://registry.npmjs.org/amdefine npm http 304 https://registry.npmjs.org/wrappy npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /var/app/ondeck/npm-debug.log npm ERR! not ok code 0. container_command 01-install-dependencies in .ebextensions/03npm.config failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
我不确定,但似乎npm install
遇到了一个可以被忽略的包错误,但它正在分派EB错误并停止整个过程。
我正在使用这台机器:64位Amazon Linux 2015.09 v2.0.4运行PHP 5.6
有人知道我们如何修复这个问题吗?
.ebextensions
中使用几乎相同的.config
文件遇到了同样的问题。你找到解决方案了吗?如果有,能否分享一下?谢谢。 - Thomaseb-activity.log
和eb-commandprocessor.log
以获取有关此错误的更多信息。我发现我的问题与我的 npm 安装本身有关。所以这不是一个eb
问题本身,我修复了简单的 npm 错误,然后继续前进。希望这些信息能帮助那里的某些人 =) - clodal