I created an elastic beanstalk node.js
app on AWS, which created the EC2 and RDS server for me. I am using putty
to connect to my Linux EC2 instance, which is successfully logged in.
But the following command doesn't work:
node -v
npm install express -g
node
it gives me an error:
bash: node: command not found
Node is automatically installed on your instance for elastic beanstalk. It's not in the path.
Look for node installation under /opt/elasticbeanstalk/node-install/
folder.
You shouldn't be installing modules from command line. The preferred way to install node modules on elastic beanstalk is thru package.json. Dependent modules are automatically installed on the instance by aws.
you should find out which node version is being used right now. Then you can use that in your PATH and use npm/node binary..
grep node /var/log/nodejs/nodejs.log
export PATH=$PATH:/opt/elasticbeanstalk/node-install/node-v6.11.5-linux-x64/bin/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With