Skip to main content

Debugging "Failed to run npm install. Snapshot logs for more details." on Elastic Beanstalk

✓ Published0🌍 Public
Aamazingandyyy
Last edited Feb 28, 2014
Created on Jan 19, 2017

This example walks through debugging an npm install failure on Elastic Beanstalk, showing two common root causes: a dependency using caret version syntax requiring Node ≥0.10.26 (beyond the platform’s 0.10.21) and the SELF_SIGNED_CERT_IN_CHAIN error from npm’s stricter certificate validation. The code demonstrates shell commands like `ebnode.py --action npm-install` to surface the full error, and a `.ebextensions` config file that runs a command to set `npm config set ca ""` as a temporary workaround. The solution relies on manual version pinning and configuration overrides rather than a visual chart.

AI-generated description