Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install npm package globally on AWS Elastic Beanstalk

I'm trying to install an npm package globally on elastic beanstalk. This is what my config file looks like which I wrote based on this documentation.

container_commands:
  install_phantom:
    command: "npm install phantomjs -g"

And when I deploy to Elastic Beanstalk I get this error

Command failed on instance. Return code: 1 Output: Error occurred during build: Command install_phantom failed .

like image 404
Loourr Avatar asked Nov 01 '22 18:11

Loourr


1 Answers

Based on the answer given here, have you tried:

container_commands:
  install_phantom:
    command: "export PATH=$PATH; npm install phantomjs -g"
like image 68
Francis Eytan Dortort Avatar answered Nov 08 '22 06:11

Francis Eytan Dortort