node.js - 亚马逊 AWS Elastic Beanstalk NodeJS 应用程序

标签 node.js amazon-web-services amazon-elastic-beanstalk

我在 Amazon AWS Elastic Beanstalk 中创建了一个 NodeJS 应用程序。每次部署应用程序时,我都会收到以下错误(在日志中):

2016-09-06T15:56:48.332Z] INFO  [17369] : Command processor returning results: 
{"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"/bin/sh: npm: command not found. \ncontainer_command 01-install-dependencies in .ebextensions/install.config failed. For more detail, check /var/log/eb-activity.log using console or EB CLI","returncode":127,"events":[]}]}

知道是什么原因造成的吗?

最佳答案

将 NodeJS 应用程序部署到 elastic beanstalk 时,npm install 会自动为您运行。您尚未发布 01-install-dependency 的内容,但从名称和脚本运行 npm install 的错误消息猜测。

不久前我做了一些调查,了解 Elastic beanstalk 自动运行哪些 npm 脚本 - npm scripts on elastic beanstalk

关于node.js - 亚马逊 AWS Elastic Beanstalk NodeJS 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39354829/

相关文章:

node.js - Azure 上的 Strapi 无法运行

javascript - 如何从 Node.js 客户端访问 Realm 移动平台?

amazon-web-services - terraform aws_lb_listener_rule 条件参数在 terraform 0.12.20 中未被识别

json - CloudFormation 嵌套堆栈参数

python - 为什么这个 python 代码在 pyspark 中工作但在 Spark-submit 中不起作用?

amazon-web-services - 如何在 Elastic Beanstalk Cloud Formation 脚本中强制进行 ELB 配置

node.js - Mongoose 按对象的对象值排序

javascript - 如何在客户端 nodejs 处理异步请求?

amazon-web-services - 每个EC2实例扩展AWS弹性beantalk中的Docker容器数量[应用程序架构]

ruby-on-rails - MultiJson AdapterError Rails 4 Ruby 2 乘客