Kevin. Kevin. - 2 months ago 14x
Node.js Question

Node.js deployment issue on Amazon Elastic Beanstalk

I'm trying to deploy a node.js app using the Amazon Elastic Beanstalk service. Following this tutorial (, 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.

Thanks in advance for your help!


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:

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:

        openssl-devel: []

For details on where the config file goes:

And details on including packages (and more) in the config file: