---
sourceDocument: Yokohama Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/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


---

# Use third-party libraries

# Use third-party libraries in applications in the ServiceNow IDE {#ariaid-title1}

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

Call third-party libraries in your application to use existing open-source functionality with the ServiceNow IDE.

## Before you begin

Create a JavaScript module. For more information, see [Create and use JavaScript modules in applications in the ServiceNow IDE](https://servicenow-prod.fluidtopics.net/A5BYeK4Sc4BMe_gVVObgrA "Optimize your codebase by defining reusable code blocks with JavaScript modules in the ServiceNow IDE.").

To install and use packages from private registries, you must configure your Package Manager user settings in the ServiceNow IDE. For more information, see [Install an npm package from a private registry with the ServiceNow IDE](https://servicenow-prod.fluidtopics.net/2jl_W7_skKHywKzzzULGsQ "Install Node Package Manager (npm) packages from a private registry as dependencies in your application to use them as third-party libraries.").

Role required: admin

## About this task

Third-party libraries are added to applications as JavaScript modules.
For general information about the syntax used to create JavaScript modules, see the [JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) page on the MDN Web Docs website.  
Important:  
You can't use third-party libraries that rely on unsupported functionality, such as unsupported APIs or ECMAScript features. For more information about unsupported functionality, see [JavaScript modules and third-party libraries](https://servicenow-prod.fluidtopics.net/szZukjhL7dMD6ptK~0Z~aw "Optimize your code base using JavaScript modules to group related code or add third-party libraries and reuse their code within applications.").

## Procedure

1. Navigate to AllApp DevelopmentServiceNow IDE.
2. Open a workspace with an application.
3. From the Activity Bar, select the File Explorer view (![File Explorer]()).
4. Open the package.json file for the application.
5. Add the `dependencies` field with the package name and version of any third-party libraries to use.  

       "dependencies": {
           "<package name>": "<version>"
         }

6. Install the third-party library packages.
   1. Use one of the following keyboard shortcuts to open the command palette:  
      * Windows: Ctrl-Shift-P
      * Mac: Cmd-Shift-P
      {#use-third-party-libraries-ide__ul_at2_3d5_ydc}
   2. Enter <kbd class="ph userinput">Package Manager: Install Dependencies</kbd> and press Enter.

   {#use-third-party-libraries-ide__substeps_omf_ggj_nhc}  
   Packages are installed in the node_modules directory.
7. In a JavaScript module, import the library using an import statement.  
   In this example, the module includes a namespace import for the lodash module.

       import * as lodash from "lodash"

   In this example, the module includes a named import for the camelCase function in the lodash module.

       import camelCase from 'lodash'

8. Call code imported from the library in your module to reuse it.
9. From the Status Bar, select Build and Install.  
   ![Build and Install](){#use-third-party-libraries-ide__build-icon}

   The active file that's open in the editor determines which application to build. If no files are open, select the application to build when prompted.  
   After building, the modules are added to the EcmaScript Module \[sys_module\] table.
* **[Install an npm package from a private registry with the ServiceNow IDE](https://servicenow-prod.fluidtopics.net/2jl_W7_skKHywKzzzULGsQ)**   
  Install Node Package Manager (npm) packages from a private registry as dependencies in your application to use them as third-party libraries.

**Related concepts**   

* [JavaScript modules and third-party libraries](https://servicenow-prod.fluidtopics.net/szZukjhL7dMD6ptK~0Z~aw "Optimize your code base using JavaScript modules to group related code or add third-party libraries and reuse their code within applications.")

*[\>]: and then


