Install the ServiceNow SDK in an application

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 4분
  • Install the ServiceNow software development kit (SDK) in a local application using Node Package Manager (npm).

    시작하기 전에

    Your system must meet the following minimum requirements to use the latest version of the ServiceNow SDK:
    • Node.js v20.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

    이 태스크 정보

    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.

    주:
    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.

    프로시저

    1. Open a command-line tool on your system.
    2. Verify that your system meets the requirements.
      1. Enter node -v​ to check if you have Node.js installed and which version.
      2. Enter npm -v to check if you have npm installed and which version.
    3. Create a local directory for your application.
    4. Change directories into the directory for your application using the cd command.
      cd <path/to/directory>
    5. Create an application with the ServiceNow SDK.
      StateSteps
      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:
      npx @servicenow/sdk auth --add <instance>

      For more information, see Authenticating to a ServiceNow instance with the ServiceNow SDK.

      Authentication has been configured
      If you have added authentication credentials, install the ServiceNow SDK in new applications with the init command. For example:
      npx @servicenow/sdk init

      For more information, see Create an application with the ServiceNow SDK or Convert an application with the ServiceNow SDK.

    다음에 수행할 작업

    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.