Install the ServiceNow SDK in an application
Install the ServiceNow software development kit (SDK) in a local application using Node Package Manager (npm).
Before you begin
Your system must meet the following minimum requirements to use the latest version of the ServiceNow SDK:
- Node.jsv20.18.0
- npm v8.19.3
To install or upgrade Node.js or npm, see the installation instructions on the npm website.
Role required: admin
About this task
The ServiceNow SDK is available as an npm package from the public npm registry. The ServiceNow SDK supports integrating with ServiceNow instances beginning with the Washington DC release.
In the following procedure, you install the ServiceNow SDK within a new application using npx rather than globally. To install the ServiceNow SDK globally, use the npm install --global @servicenow/sdk command.
Note: If you use npx to install the ServiceNow SDK in application rather than globally, you must use npx @servicenow/sdk [command] rather than now-sdk [command] with the ServiceNow SDK CLI.
Procedure
Open a command-line tool on your system.
Verify that your system meets the requirements.
Enter
node -vto check if you have Node.js installed and which version.Enter
npm -vto check if you have npm installed and which version.
Create a local directory for your application.
Change directories into the directory for your application using the
cdcommand.cd <path/to/directory>Create an application with the ServiceNow SDK.
| State | Steps |
|---|---|
| Authentication hasn't been configured | If you haven't added authentication credentials and an alias on your system yet, install the ServiceNow SDK with the `auth` command before creating an application with the `init` command. For example: |
| Authentication has been configured | If you have added authentication credentials, install the ServiceNow SDK in new applications with the `init` command. For example: |
What to do next
Install the ServiceNow Fluent Language server to get language processing and validation for ServiceNow Fluent in Visual Studio Code. For more information, see Install the ServiceNow Fluent Language server in Visual Studio Code.
Parent Topic:Configuring the ServiceNow SDK
Related topics
Install the ServiceNow Fluent Language server in Visual Studio Code