Reputation: 3
I am trying to use shell_exec to run a node app like that:
shell_exec(node app.js) ;
But I got an error: sh: node: command not found
I have tried to install node js using confing file like that:
commands:
01_node_install:
# 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: 'yum install -y nodejs --enablerepo=epel'
This was all of my env.config file but I don't see anything in the Elastic Beanstalk log related to that and the problem still exists. How could I use Node JS from php environment !!
Upvotes: 0
Views: 462
Reputation: 1066
Your configuration file is fine. Just make sure that env.config is inside .ebextensions folder in the root directory of your project.
Upvotes: 1