I've got a PHP application that uses gulp to build the production files, I'm using elasticbeanstalk to deploy my app to and AWS EC2 instance and I want to install node and npm to run gulp during the deploy, my current configuration is:
01-installPackages.config inside .ebextenstions folder
commands:
01updateComposer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
02installNode:
command:
# run this command from /tmp directory
cwd: /tmp
# don't run the command if node is already installed (file /usr/bin/node exists)
test: '[ ! -f /usr/bin/node ] && echo "node not installed"'
# install from epel repository
# flag -y for no-interaction installation
command: 'sudo yum install -y nodejs --enablerepo=epel'
the node commands fails but if I ssh in and i run that command node is installed
any idea of what's wrong with my configuration?
Thanks!