---
sourceDocument: Yokohama Build or modify applications
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/application-development

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Install an npm package from a private registry

# Install an npm package from a private registry with the ServiceNow IDE {#ariaid-title1}

* Release version: Yokohama
* 
* Updated July 31, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

Install Node Package Manager (npm) packages from a private registry as dependencies in your application to use them as third-party libraries.

## Before you begin

Role required: admin

## About this task

To install packages from private registries, you must configure your Package Manager user settings in the ServiceNow IDE. Then you can choose in which applications to install packages.

ServiceNow IDE uses the public npm registry (https://registry.npmjs.org) as its default package source. If your network blocks access to this registry, you must have access to an alternate registry to download packages and build applications in the ServiceNow IDE. If access to the public npm registry is blocked on your system, you must configure a private npm registry in your Package Manager user settings in the ServiceNow IDE.  
Note:  
To install packages from a private registry, the registry must respond with the HTTP `Access-Control-Allow-Origin` header.

## Procedure

1. Navigate to AllApp DevelopmentServiceNow IDE.
2. Open a workspace.
3. Use one of the following keyboard shortcuts to open the command palette:  
   * Windows: Ctrl-Shift-P
   * Mac: Cmd-Shift-P
   {#use-library-private-npm-registry__ul_j4x_ns4_gcc}
4. Enter <kbd class="ph userinput">Preferences: Open User Settings (JSON)</kbd> and press Enter.
5. Specify a private registry as the default registry or a scoped registry from which you can install packages.

   | Option | Example |
   | Default registry | "package-manager.defaultRegistry": "<private-registry-url>", |
   | Scoped registry | "package-manager.scopedRegistries": [ { "scope": "@<scope>", "registry": "<private-registry-url>" }, ... ] |
   |-|-|

   {#use-library-private-npm-registry__choicetable_mnm_z32_42c}  
   Note:  
   To install packages from public registries, you can specify a public registry as the default registry or a scoped registry in addition to any private registries.
6. Provide your credentials for accessing the private registry.

   | Option | Description |
   | Basic authentication | Provide a user name and password to access the default registry that you specified. "package-manager.basicAuth": [ { "registry": "<private-registry-url>", "user": "<user-name>", "pass": "<password>" }, ... ] |
   | Legacy authentication | Provide a legacy token to access the default registry that you specified. Legacy tokens are basic authentication credentials encoded in Base64 format. "package-manager.legacyAuth": [ { "registry": "<private-registry-url>", "token": "<legacy-token>" }, ... ] |
   | Token authentication | Provide a bearer token to access the default registry that you specified. "package-manager.tokenAuth": [ { "registry": "<private-registry-url>", "token": "<token>" }, ... ] |
   |-|-|

   {#use-library-private-npm-registry__choicetable_qmx_xht_ydc}
7. Save your changes to the settings.json file.
8. Install packages from the configured registries.
   1. Use one of the following keyboard shortcuts to open the command palette:  
      * Windows: Ctrl-Shift-P
      * Mac: Cmd-Shift-P
      {#use-library-private-npm-registry__ul_at2_3d5_ydc}
   2. Enter <kbd class="ph userinput">Package Manager: Install Dependencies</kbd> and press Enter.
   3. Select an application to install packages in as dependencies.

   {#use-library-private-npm-registry__substeps_omf_ggj_nhc}  
   Packages are installed in the node_modules directory.
{#use-library-private-npm-registry__steps_vvl_kd5_ydc}

## User settings for private registry access {#use-library-private-npm-registry__example_gff_g25_ydc}

In the following example, a user configured access to a private registry using basic authentication. The user also configured their settings to install packages from a public registry with the `@example`
scope.

    {
        "files.autoSave": "off",
        "package-manager.defaultRegistry": "<private-registry-url>",
        "package-manager.basicAuth": [
            {
            "registry": "<private-registry-url>",
                "user": "<user-name>",
                "pass": "<password>"
            }
        ],
        "package-manager.scopedRegistries": [
            {
                "scope": "@example",
                "registry": "<public-registry-url>"
            }
        ]
    }

## What to do next

Use the packages that you installed as third-party libraries in your application. For more information, see [Use third-party libraries in applications in the ServiceNow IDE](https://www.servicenow.com/docs/BCfMk1eiyQQLS0jWBhFUaw "Call third-party libraries in your application to use existing open-source functionality with the ServiceNow IDE.").

*[\>]: and then


