How to use a private npm registry on Elastic Beanstalk?

前端 未结 6 1033

We have a nodejs project running on Amazon Elastic Beanstalk that uses private modules that we host using nodejitsu\'s private npm registry.

However getting access t

6条回答
  •  广开言路
    2020-12-05 19:14

    Place the below within your .ebextensions/app.config.

    files:
      "/tmp/.npmrc":
        mode: "000777"
        owner: root
        group: root
        content: |
          //registry.npmjs.org/:_authToken=$NPM_TOKEN
    

    Where NPM_TOKEN is an environment variable with the value of your actual npmjs auth token.

    Note that environment variables within elasticbeanstalk can and should be set from within the AWS console Elasticbeanstalk software configuration tab.

    AWS Elasticbeanstalk Configuration

提交回复
热议问题