You can change the visibility of the scoped package from the web site or from the command line. You must be the owner of the user account or organization for this package to change the visibility of the package. For more information about Package visibility, see “Package Scope, Access level, and Visibility “.

Note: You cannot change the visibility of non-scoped packages. Scoped packages that can only be paid for can be private.

Privatize the public purse

Note: Privatizing packages requires paying user accounts or organizations. Registered user accounts or organization, visit www.npmjs.com/settings/ac. , replace account-name with the name of your NPM user account or organization.

Use the site

If you want to limit access and visibility to public packages that you own, you can make the packages private. When you make a package private, it will be removed from the site within minutes of the change.

  1. On the NPM web site, go to the packages page.
  2. On the package page, click Admin.
  3. Under “Package Access”, select “Is Package Private?”
  4. Click Update Package Settings.

Using the command line

Using the command line to make the public package private, run the following command to replace with the name of your package:

npm access restricted <package-name>
Copy the code

See the NPM Access documentation for more information.

Make private packages public

Note: When you make a private package public, all NPM users can see and download the package.

Use the site

  1. On the NPM web site, go to the packages page.
  2. On the package page, click Admin.
  3. Under “Package Access”, deselect “Is Package Private?”
  4. Click Update Package Settings.

Using the command line

To expose private packages from the command line, run the following command to replace with your package name:

npm access public <package-name>
Copy the code

See the NPM Access documentation for more information.