我想使用eb deploy命令在Amazon Elastic Beanstalk中部署我的 PHP应用程序.但我的应用程序使用gulp连接和缩小scss和js. 所以我在文件.ebextensios / 03npm.config中尝试了这些命令 commands: 01-install-node:
所以我在文件.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错误并停止整个过程.
我正在运行这台机器:运行PHP 5.6的64位Amazon Linux 2015.09 v2.0.4
有谁知道我们如何解决这个问题?
packages: yum: git: [] files: "/opt/elasticbeanstalk/hooks/appdeploy/pre/03_npm_install.sh": mode: "000755" owner: root group: root content: | #!/usr/bin/env bash EB_APP_STAGING_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_staging_dir) cd $EB_APP_STAGING_DIR npm install bower npm install ./node_modules/bower/bin/bower install --allow-root --config.interactive=false ./node_modules/grunt-cli/bin/grunt dust