使用AWS Elastic Beanstalk我select启动运行NodeJS的实例。 EC2实例启动,但是当我检查节点正在运行的版本时,我得到这个:
node --version
-bash: node: command not found
我的EC2实例AMI ID aws-elasticbeanstalk-amzn-2015.09.2.x86_64-nodejs-pv-201602232224 (ami-ae3fddce)
AMI映像默认不会将节点添加到bash PATH中。
您可以在/ bin中添加符号链接,使用以下bash命令指向节点。
sudo ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/node /bin/node