Example .npmrc file for private NPM Registry organization
To publish a private scoped package to the npm registry, you'll need to create an .npmrc
file in the root directory of your package with the following content:
//registry.npmjs.org/:_authToken=YOUR_AUTH_TOKEN
@your-scope:registry=https://registry.npmjs.org/
Replace YOUR_AUTH_TOKEN
with your npm authentication token, which you can generate from the npm website or using the npm token create
command.
Replace your-scope
with your package's scope name.
This .npmrc
file will ensure that your scoped package is published to the correct registry with the appropriate authentication token.