You can configure Buddy to use private modules from the npm registry in your projects. This article will tell you how.
Log in to the npm locally. The user you’re logging with must have access to the private packages that you want to use:
Once you do it, display the file contents:
Now copy the
auth token. You will find it in the file after such string:
Add token to Buddy as ENV VAR
Go to the Project Options in Buddy. Choose the Environment variables tab and click Add a new variable:
Add the variable with the value of the acquired token:
Dependencies are fetched at the moment of executing the
npm install command.
If you have private packages in the dependencies, execute:
npm config set //registry.npmjs.org/:_authToken $NPM_AUTH_TOKEN npm install$$
To set your company's registry as default use npm config set registry followed by the company registry address
GitHub Private Package registry
To authenticate into GitHub, make sure your
.npmrc file has the following structure: