小编Har*_*son的帖子

如何使用 .ebextensions 在 Amazon Elastic Beanstalk 中运行 `npm install`

我想使用eb deploy命令在 Amazon Elastic Beanstalk 中部署我的 PHP 应用程序。但是我的应用程序使用 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"
Run Code Online (Sandbox Code Playgroud)

但最后我收到这个错误

[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 …
Run Code Online (Sandbox Code Playgroud)

amazon-ec2 amazon-web-services lampp node.js npm

8
推荐指数
1
解决办法
9731
查看次数

标签 统计

amazon-ec2 ×1

amazon-web-services ×1

lampp ×1

node.js ×1

npm ×1