Internal and External NPM packages
Artifactory NPM registry can be used for two reasons:
- NPM-remote: Using the Artifactory NPM registry will ensure that any NPM dependency will be stored within a storage managed and maintained only by this department.
Therefore, it does not matter if the source of the NPM is removed. There is no external dependency. - NPM-local: We are able to create our own NPM package and share them internally.
Both “NPM-remote” and “NPM-local” are accessed through the “NPM” registry.
It is therefore only necessary to point to the NPM registry from your local developer environment.
It is a prerequisite for the following guide that an internal NPM package has been added to Artifactory. For the sake of the guide, we will reference this NPM package by the name of “new-npm”.
How to access Artifactory NPM registry from local environment
Step 1: Modify the “.npmrc” configuration file.
Open the .npmrc-file (usually located in “C:\Users\\.npmrc” on Windows) with a text editor.
If the file does not already exist, just create it.
Add the following configurations. Save and close afterwards.