Error when running @servicenow/sdk install: "Unable to install application as application was null"

ishikawa-da
Giga Sage

Hi everyone,

I am encountering an issue while trying to install a new project using the ServiceNow SDK (Fluent API). The build process completes successfully, but the installation fails with a "null" error.

Environment:

  • SDK Version: 4.6.0 (@servicenow/sdk)

  • Project Status: Freshly initialized following the official documentation

Steps taken:

  1. I followed the official guide to create an "Example App": Create an application with the ServiceNow SDK

  2. Ran npx @Servicenow/sdk build -> Result: Build completed successfully

  3. Ran npx @Servicenow/sdk install --auth <alias> -> Result: ERROR: Exception occurred while installing application / Unable to install application as application was null

Key Observation: Although the error says "application was null," I have verified that the dist directory is not empty. As shown in the attached screenshot, the build process correctly generated the metadata files, including sys_app and various sys_update items (Client Scripts, etc.) under the dist/app folder.

I have already verified that my authentication credentials are correct and the alias is properly stored.

Has anyone encountered this "application was null" error before? Any insights on why the installer might fail to recognize the generated application metadata?

Thanks in advance!

 

ishikawada_0-1776359374439.png