Publish npm Packages
Let's assume you have an npm package and want to publish it to the newly created npm registry using the npm command-line tool.
Note that publishing packages with the same package version is not allowed. The server will return the 409 HTTP response.
Publish packages using npm command-line tool
Log in to the npm registry:npm login --registry https://npm.pkg.jetbrains.space/mycompany/p/projectkey/mynpm
https://npm.pkg.jetbrains.space/mycompany/p/projectkey/mynpmis the registry URL
mycompanyis the name of your company in Space,
mynpmis 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
.npmrcconfiguration file and used for all further connections to the specified registry. You can manage the created token on the My Profile | Personal Tokens page.
Open the directory containing the package you want to publish.
Publish the package to the registry:npm publish --registry https://npm.pkg.jetbrains.space/mycompany/p/projectkey/mynpm