Amazon Elastic Beanstalk node and npm non-standard install locations

后端 未结 5 567
遥遥无期
遥遥无期 2021-01-30 01:41

Amazon Beanstalk installs node and npm into really obscure places - and I\'m not sure they won\'t change if EB decides to use a newer version of node, which would cause my appli

5条回答
  •  自闭症患者
    2021-01-30 02:15

    You can add the most recent node and npm binaries to $PATH with a command like this:

    PATH=$PATH:`ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin
    

    I couldn't figure out how to prevent beanstalk commands from resetting the $PATH back again.

    If you are so inclined you can probably create a symlink with a command similar to the above and use that as your reference point in cron scripts etc.

    Agreed, it is very very annoying.

提交回复
热议问题