npm Blog (Archive)

The npm blog has been discontinued.

Updates from the npm team are now published on the GitHub Blog and the GitHub Changelog.

solving npm’s hard problem: naming packages

There are only two hard things in Computer Science: cache invalidation and naming things.

—Phil Karlton

Naming things is hard. It’s even harder when there are tens of thousands of other people who want to use the same names that you do. With 141,898 modules on npm, it has been getting hard to find a name that isn’t taken.

Naming things just got a little bit easier for npm users with the introduction of scopes. We rolled out scopes as part of the release of private modules last week, but scopes can be used for public packages, too.

What are scopes?

Scopes are like namespaces for npm packages. Each npm user has their own scope.

@username/project-name

This means that you don’t have to worry about someone else taking your package name. Only you can add packages in your scope.

Scoped modules also make it possible to put your private code on npm when you sign up for private modules. With private modules, you have control over who can see and collaborate on any of the modules in your scope.

Start using scopes today

Public scoped packages are free. To create a scoped package, all you need to do is add your scope to the front of the name property in package.json and run npm with the access option:

npm publish --access=public

Check out the docs to start using scopes today, and if you need help, be sure to let us know at support@npmjs.com or @npm_support.