Skip to content

Instantly share code, notes, and snippets.

@bshyong
Created November 24, 2015 02:57
Show Gist options
  • Save bshyong/4655ec3fb69340eb3cc0 to your computer and use it in GitHub Desktop.
Save bshyong/4655ec3fb69340eb3cc0 to your computer and use it in GitHub Desktop.
Getting npm install to work on AWS Elastic Beanstalk
  1. Disable normal asset compilation
  2. Make sure npm is updated to 3.5.0
  3. Add commands to make sure #2 is done before app code is deployed
  4. Use container commands to do npm install and precompile assets
  commands:
  00_update_npm:
    command: "sh /tmp/install_node_npm.sh"

  container_commands:
    01_npm_install:
      command: npm install --unsafe-perm
    02_precompile_assets:
      command: bundle exec rake assets:precompile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment