Get npm Packages
The typical way of getting an npm package is installing it using the npm
, yarn
or pnpm
tools.
Log in to the npm registry:
npm login --registry https://npm.pkg.jetbrains.space/mycompany/p/projectkey/mynpmhttps://npm.pkg.jetbrains.space/mycompany/p/projectkey/mynpm
is the registry URLmycompany
is the name of your company in Space,mynpm
is the registry name.
If you are not sure about the URL, you can copy the URL of a particular npm registry on the Packages page.
When asked for credentials, specify your Space username and password. npm uses permanent tokens for authentication. Once you log in to the registry, Space will automatically create a permanent token specifically for accessing the npm registry. This token will be saved in your local
.npmrc
configuration file and used for all further connections to the specified registry. You can manage the created token on the My Profile | Security | Personal Tokens page.In Space, open Packages and find the desired npm package.
Note that you can use the npm search command to find a package by its name, for example:
npm search mynpmpackage --registry https://npm.pkg.jetbrains.space/mycompany/p/projectkey/mynpmOpen the package properties page.
In the snippets field, select your tool and copy the snippet code.
Run the snippet on your local machine.
Alternatively, you can download the package using Download and install it from your local machine.