Reputation: 541
I have a python-based AWS elasticbeanstalk application which I am trying to use to deploy a python application which needs to run the requirejs optimizer. To optimize my requirejs code, I need either NodeJS (preferred) or another way to run the requirejs optimizer.
How can I install nodejs on an elasticbeanstalk python environment?
I have tried using yum, and rpm but can't find nodejs packages. Ideally, it will be installed by changing configs in the elasticbeanstalk's .ebextensions/.config file.
Thanks
Upvotes: 2
Views: 300
Reputation: 541
I found the answer:
instead of using the packages config to install node
packages:
yum:
nodejs: []
I used a custom command to install nodejs using yum with a custom config enabling the epel repo
container_commands:
01_install_node:
command: "yum install -y --enablerepo=epel nodejs"
I can confirm that node is now installed on the environment and can run the requirejs optimizer.
Upvotes: 1