Create a .npmrc
file for your project like this:
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
Then find your token inside the ~/.npmrc
file in your home folder and set it as an NPM_TOKEN environment variable through netlify's admin UI.
@bsdahl use an .envrc
file: https://github.com/direnv/direnv
The private packages located in GitHub under one project, I have 10-15 small Modules now,
my npmrc look like this
@organization:registry=https://npm.pkg.github.com
I don't have a token setup here, How to make it work in my scenario
EDIT
See this thread on the npm forum about configuring w/ env vars.