For Node.js projects you might be using private npm modules as dependencies. You can follow the steps below to ensure they are made available during the build process.
This is usually in a
~/.npmrcfile on your local machine. Follow these steps to get your token.
Add your npm token as a secret
Just like any other environment variable, follow these steps to add your token as a secret in the Seed console. For this example we will name your environment variable
Store your token in the build process
Add the following to your build spec (
before_compile: - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
This uses the
NPM_TOKENenvironment variable from the previous step to create a
.npmrcfile to reference your private npm modules.
That’s it! This should tell npm to use your token to reference your private modules.