Use of @ symbol in Node module names [duplicate]

Scoped packages in npm are preceded by an ‘@’ symbol.

A scope allows you to create a package with the same name as a package created by another user or Org without conflict. https://docs.npmjs.com/about-scopes

Scopes are a way of grouping related packages together, and also affect a few things about the way npm treats the package. Each npm user/organization has their own scope, and only you can add packages in your scope. This means you don’t have to worry about someone taking your package name ahead of you. Thus it is also a good way to signal official packages for organizations. https://docs.npmjs.com/misc/scope

The docs include additional information on requiring scoped packages:
https://docs.npmjs.com/misc/scope#requiring-scoped-packages

Requiring scoped packages

Because scoped packages are installed into a scope folder, you have to
include the name of the scope when requiring them in your code, e.g.

require('@myorg/mypackage')

There is nothing special about the way Node treats scope folders, this
is just specifying to require the module mypackage in the folder
called @myorg.

Leave a Comment