npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

hot to configure npm to use npm, Inc.’s private registry? says
npm is configured to use npm, Inc.’s public registry at by default.
What registry setting for private package hosted by npm inc? says Scopes can be associated with a separate registry. This allows you to seamlessly use a mix of packages from the primary npm registry and one or more private registries, such as npm Enterprise.

The " npm Orgs Best for smaller teams and organizations" is not enterprise, but not public, so what do i use ?

When I try to “npm install @myprivatescope/mypackage”, i get the error " Error: 404 Not Found:"

So i’m guessing i need to set something to use these private packages.

bts, npm loging does not do it.

Private packages are hosted on the main registry (as opposed to private/custom registries like npm Enterprise). However, they require proper authentication. Did you say logging in didn’t work?

Thank you for the suggestion. I finally got it working.

Looks like I messed up the


file by trying to set the registry, since the documentation did not say anything about private packages being stored the same place as public. I deleted the registry line, and things started working.

Yes, I did a

npm login

, but did not see any documentation about needing a login and it did not help because the messed up

trying to set the registry.

Q: I see a boatload of tokens on

A token is generated every time I log in? Do these ever expire or do last accumulate over time and last forever?

Q; is there where I can make suggestions for the documentation? If so,

Line “If you wish, you may associate a scope with a registry; see below.”
Add “This is not necessary for private packages hosted by npm”

Line " You can then change the access permissions, if desired, with npm access or on the website."
Add "Alternatively, to post to your private scope, make sure the name in package.json included your scope as in @blawblaw/mypackage, then npm login, and npm publish.

add “not required for npm Orgs private packages”

Line: “Installing scoped packages”
add "Must have an auth token in the ~/.npmrc file before issuing these commands. The easiest way to add this token is to issue the “npm login” command

Hi John,

I’m glad you were able to solve the issue. We do read and track docs suggestions here. Yes, a new token is generated when you log in. You can learn more about tokens here: Tokens expire when you log out or if you delete them on that page or through the CLI.