dubeegee dubeegee - 1 year ago 190
Node.js Question

Amazon Elastic Beanstalk node and npm non-standard install locations

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 application to break.

These are the locations for node and npm:


I'm worried about the
part changing and I'd rather not grep for things in cron or monit scripts when trying to find something that is normally just

how do I get a consistent filepath for these executables? and why does EB do this?

for reference, I tried setting the
option in an
, it had no effect on the install location.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download