---
sourceDocument: Australia Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/application-development

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Download dependencies

# Downloading dependencies with the ServiceNow SDK {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 5 min. de leitura

Download application dependencies and TypeScript definitions from an instance for IntelliSense and validation of scripts and ServiceNow Fluent code.Download the application dependencies configured in the now.config.json file and script dependencies, such as TypeScript type definitions for Glide APIs and script includes, from the instance.

Throughout the development process, you should download dependencies and TypeScript definitions from an instance to support coding against those dependencies in an application.  
To download all script and ServiceNow Fluent dependencies for an application, you can use the `dependencies` command with no parameters. If needed, provide the application directory and authentication alias too.

    now-sdk dependencies [--directory <package path>] [--auth <alias>]

## Download ServiceNow Fluent application dependencies {#ariaid-title2}

Download TypeScript definitions for dependencies in other application scopes to get IntelliSense support and validation for ServiceNow Fluent code.

### Antes de Iniciar

Add an application to your local system with the ServiceNow SDK. For more information, see [Adding applications with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/oY6_6ESXjujwGkOwEXUj_w "Add applications to your local system to get started with development in source code with the ServiceNow SDK.").

Role required: admin

### Por Que e Quando Desempenhar Esta Tarefa

This procedure uses the ServiceNow SDK command-line interface (CLI). From a command-line tool, enter `now-sdk --help` to get information about the available commands and global options. To get additional information about a
command and its parameters, enter the command and `--help` or `-h`. For example, `now-sdk auth --help`. For more information about the CLI, see [ServiceNow SDK CLI](https://servicenow-prod.fluidtopics.net/PRE3GTgYc~ImvC7_7y2WzA#servicenow-sdk-cli-commands "Use the ServiceNow SDK command-line interface (CLI) to manage changes between a local application and the application on an instance.").

### Procedimento

1. In Visual Studio Code, open your scoped application directory.
2. In the now.config.json file, add the items that your application depends on in the `dependencies` object.  
   The `dependencies` object has the following structure. You must specify the application scope and the dependency type and names or sys_ids. Only tables and roles can be specified by name. You can use a
   wildcard (`*`) to add all items from a specified table and scope.

       "dependencies": {
           "<scope>": {
             "<type>": ["<sys_id or name>"],
             ...
           },
           ...
       }

   For example:

       {
         "dependencies": {
           "global": {
             "tables": ["incident", "problem"],
             "roles": ["admin"],
             "sys_script_client": ["fa776f6d97700100f309124eda2975bc"]
           },
           "x_custom": {
             "tables": ["custom_table"],
             "sys_security_acl": "*",
           }
         }
       }

3. In the now.config.json file, add the tables that your application depends on in the `dependencies` object.  
   In the `applications` object, you must specify the application scope of the table and then list the table dependencies within the specified scope.  
   In the following example, the tables specified are downloaded from the global and sn_ace scopes.

       "dependencies": {
         "applications": {
           "global":{
             "tables": ["cmdb_ci_server"]
           },
           "sn_ace": {
             "tables": ["sn_ace_app_config"]
           }
         }
       }

4. Save your changes.
5. From the application directory, open an integrated Terminal window.
6. Download dependencies of the application with the `dependencies` command.  

       now-sdk dependencies --auth <alias> --fluent-only

   Nota:  
   If you want to download script dependencies too, exclude the `--fluent-only` parameter.  
   Dependencies are generated in the src/fluent/generated/schema directory with the .ts file extension. When building the application, these
   files aren't compiled like source code files because they don't end in the .now.ts file extension.

   The `dependencies` command downloads the dependencies specified in the now.config.json file and generates TypeScript definitions for them in the src/fluent/generated/schema@types/servicenow/fluent directory with the .d.now.ts file extension. When building the application, these files aren't compiled like source code
   files.

### O que Fazer Depois

You can reference dependencies in ServiceNow Fluent files using the `#now:{scope}/{category}` subpath import format. For example:

    // Import roles from global scope
    import { role as globalRole } from '#now:global/security'

    // Import roles from custom app scope
    import { role as xExampleAppRole } from '#now:x_example_app/security'

    // Use in ACLs, flows, etc.
    Acl({
        $id: Now.ID['my_acl'],
        type: 'record',
        table: 'incident',
        operation: 'read',
        roles: [globalRole.admin, xExampleAppRole.xExampleAppCool],
    })

Your application's package.json file must include the following `imports` configuration to do so:

    {
      "imports": {
        "#now:*": "./@types/servicenow/fluent/*/index.js"
      }
    }

## Download module and script dependencies {#ariaid-title3}

Download TypeScript definitions for module and script dependencies to get IntelliSense support and validation for Glide APIs and script includes.

### Antes de Iniciar

Add an application to your local system with the ServiceNow SDK. For more information, see [Adding applications with the ServiceNow SDK](https://servicenow-prod.fluidtopics.net/oY6_6ESXjujwGkOwEXUj_w "Add applications to your local system to get started with development in source code with the ServiceNow SDK.").

Role required: admin

### Por Que e Quando Desempenhar Esta Tarefa

This procedure uses the ServiceNow SDK command-line interface (CLI). From a command-line tool, enter `now-sdk --help` to get information about the available commands and global options. To get additional information about a
command and its parameters, enter the command and `--help` or `-h`. For example, `now-sdk auth --help`. For more information about the CLI, see [ServiceNow SDK CLI](https://servicenow-prod.fluidtopics.net/PRE3GTgYc~ImvC7_7y2WzA#servicenow-sdk-cli-commands "Use the ServiceNow SDK command-line interface (CLI) to manage changes between a local application and the application on an instance.").

### Procedimento

1. In Visual Studio Code, open your scoped application directory.
2. From the application directory, open an integrated Terminal window.
3. Download dependencies for scripts in the application with the `dependencies` command.  

       now-sdk dependencies --auth <alias> --type-defs-only

   Nota:  
   If you want to download application dependencies too, exclude the `--type-defs-only` parameter.  
   The `dependencies` command downloads type definitions for all Glide APIs and scans the modules and scripts in your application and creates type definitions for the script includes that they use. Type definitions are added in the @types/servicenow directory. To add any other type definitions, you can create them manually. For more information, see [Add type definitions for APIs](https://servicenow-prod.fluidtopics.net/4F8HPYX0tsPEop1Eqxi9dQ#add-type-definitions-apis "Get type-ahead support for APIs and scriptable objects outside of Glide APIs.").Type definitions are downloaded into the @types/servicenow directory based on the scripts in your application.
4. In the src/fluent directory, create a tsconfig.server.json file for server-side scripts.  
   In the `include` object, include the type definitions that you downloaded for server-side Glide APIs (glide.server.d.ts) and script includes (script-includes.server.d.ts).  

       {
         "compilerOptions": {
           "lib": [
             "ES2021"
           ],
           "noEmit": true,
           "checkJs": false,
           "allowJs": true,
           "noEmitHelpers": true,
           "esModuleInterop": false,
           "module": "None",
           "types": []
         },
         "include": [
           "./**/*.server.js",
           "../../@types/servicenow/*.server.d.ts",
         ]
       }

5. In the src/fluent directory, create a tsconfig.client.json file for client-side scripts.  
   In the `include` object, include the type definitions that you downloaded for client-side Glide APIs (glide.client.d.ts).  

       {
         "compilerOptions": {
           "target": "ES6",
           "lib": [
             "DOM",
             "ES6"
           ],
           "checkJs": false,
           "allowJs": true,
           "noEmit": true,
           "noEmitHelpers": true,
           "esModuleInterop": false,
           "module": "None",
           "types": []
         },
         "include": [
           "./**/*.client.js",
           "../../@types/servicenow/*.client.d.ts",
         ]
       }

6. In the src/fluent directory, create a tsconfig.json file.  
   Nota:  
   This tsconfig.json file is separate from a tsconfig.json file used for applications that use TypeScript to create JavaScript modules.

   In the `references` object, add the paths to the tsconfig.server.json and tsconfig.client.json files.  

       {
         "files": [],
         "references": [
           {
             "path": "./tsconfig.server.json"
           },
           {
             "path": "./tsconfig.client.json"
           }
         ]
       }

7. Save your changes.

### Resultado

With this configuration, you can use the .server.js file extension for server-side scripts and .client.js file extension for client-side scripts and get type-ahead support during
development.

