Amazon Elastic Beanstalk node and npm non-standard install locations

后端 未结 5 486
遥遥无期
遥遥无期 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:32

    Following Peter Johnson & Greg Tatum replies I created a symlink to the latest node executable:

    container_commands:
      01_node_binary:
        command: "ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/node /bin/node"
    
    • I find the latest version of the node install binary
    • Out of it I create a symlink in the /bin directory (which is part of the $PATH)

提交回复
热议问题