在Amazon Elastic魔豆Node.js的部署问题 [英] Node.js deployment issue on Amazon Elastic Beanstalk

查看:263
本文介绍了在Amazon Elastic魔豆Node.js的部署问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用部署在亚马逊弹性魔豆服务的node.js应用程序。继本教程(的http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs.sdlc.html),我成功地部署应用程序,但是,一旦上传到亚马逊的应用程序未能启动调查日志告诉我下面的错误:。无法故宫运行安装

I'm trying to deploy a node.js app using the Amazon Elastic Beanstalk service. Following this tutorial (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs.sdlc.html), I managed to deploy the app. However, once uploaded on Amazon, the application failed to start. Investigating the logs show me the following error : "Failed to run npm install".

有没有人有什么样的问题可能是个好主意?该应用程序是伟大的工作在本地。

Does anyone have a good idea of what the problem might be ? The application is working great locally.

在此先感谢您的帮助!

推荐答案

我有同样的问题,凯文的解决方案,解决了这个问题对我来说,却引入了另:为自动缩放衍生出了EB新情况还需要手动配置。这是修改凯文的方法,我是为了解决两个问题:

I was having the same issue and Kevin's solution solved the problem for me, but introduced another: New instances spawned by EB for auto-scaling also need the manual configuration. This is the modification to Kevin's method that I made to solve both issues:

另一种方式来解决凯文的问题是添加所需的软件包,为您的应用程序的配置文件。创建具有扩展的.config(例如,myapp.config)的配置文件,并将其放置在一个.ebextensions源包的顶级目录。为了要求的OpenSSL的开发包,包括在配置文件中的这些行:

Another way to solve Kevin's issue is to add the required packages to a config file for your application. Create a configuration file with the extension .config (e.g., myapp.config) and place it in an .ebextensions top-level directory of your source bundle. In order to require the openssl-devel package, include these lines in the config file:

packages:
    yum:
        openssl-devel: []

有关,其中配置文件云的详细信息:<一href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_custom_container.html">http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_custom_container.html

For details on where the config file goes: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_custom_container.html

和对包括包(及以上),在配置文件的详细信息: <一href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html">http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html

And details on including packages (and more) in the config file: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html

这篇关于在Amazon Elastic魔豆Node.js的部署问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆