Amazon Elastic Beanstalk node and npm non-standard install locations

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

    I created the file /.ebextensions/node.config in my project folder to declare my node version and add symlinks to the /bin folder. More information about the .ebextensions folder can be found here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html

    option_settings:
      - option_name: NodeVersion
        value: 0.12.2
    files:
      "/bin/node" :
        mode: "755755"
        content: "/opt/elasticbeanstalk/node-install/node-v0.12.2-linux-x64/bin/node"
      "/bin/npm" :
        mode: "755755"
        content: "/opt/elasticbeanstalk/node-install/node-v0.12.2-linux-x64/bin/npm"
    

提交回复
热议问题