
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
10-24-2022 10:42 AM - edited 05-28-2025 12:07 PM
ServiceNow Command Line Interface (CLI)
NOTE: This was originally posted in 2022 and the application has advanced significantly since then, e.g. as of May 2025 it now supports Node 20. Please refer to the latest documentation to install the CLI and thanks for following this over the years.
The ServiceNow Command Line Interface (ServiceNow CLI or “SNC CLI”) is a tool which you can install and use it to make your own custom components which you can then leverage on a UIB page much like other components which ServiceNow has developed for your use...
- 6,098 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This was great help!
Only comment, to get NVM installed with the mentioned link, you need to have XCode command line tools installed. You can get this from https://developer.apple.com/downloads.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I kept getting an error when starting step C while trying to run this command:
snc extension add --name ui-component
I was getting the following error:
npm WARN using --force I sure hope you know what you are doing.
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! request to https://registry.npmjs.org/@servicenow%2fcli failed, reason: unable to get local issuer certificate
Solution
Apparently this could be caused when using a corporate network. After switching to a different network (mobile hotspot), it worked as expected.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is a great help, thanks! However, I've been struggling to get this working. I've found different pages that say you need different nodejs versions, and I'm still not sure which is right. When I use v12.16.1 I can get as far as the step to scaffold the project, but I get:
SyntaxError: Unexpected token '.'
Whereas if I use v16.16.1 I get an error saying you cannot scaffold a project in a non-empty folder, even though I'm running the command in an empty folder.I can see it's created a weird 'JJ' file in that folder, but nothing else.
I've now installed so many nvms, npms, node versions, python versions, etc. I may have completely messed up this PC so I'll probably rebuild and start again sometime, but I thought I'd check if you had any ideas first 🙂
I'm using the latest version of the CLI, which is 1.1.2.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Guys,
Hope you are doing fine.
I have all the items in checklist
1. node at v14
2. installed snc ui-component
3. I successfully connect with the host and set up profile.
I have a problem with creating a project, whenever i try creating a project I get this sacffold error.
I have created an empty folder and navigated to the respective directory, and that folder doesn't have anything in it. When I execute the project creation command a dummy file gets created and the error stops everything.
Any fixes please.
If I can create the project I can proceed with component creation & deployment.
Any help would be appriciated.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Harish Kumar13 I was seeing this same error a couple of weeks ago, when I tried to do this. I found I had more success when I created a new folder (mine was at the root of C:\ but I'm not sure that matters), and instead of creating it from windows, I created it with md [foldername] in a command window.
Granted, even after I got it to scaffold a project, I still couldn't get any of my pre-created packages onto an instance, but I'm looking forward to having some time to keep playing with this soon.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Everyone, my apologies but this is an old thread and the technology (thankfully) has advanced significantly.
The issue is probably your version of node. As I type this in May of 2025 we now support node 20! Please refer the latest documentation and I will be retiring this thread. Thanks for following!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hey, that's great to hear, @Jon G Lind . Thanks! I'll re-test again this weekend.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks @phil_bool_unifiunifi, but sadly your solution didn't solve my problem.
@Jon G Lind I have tried using all possible version combinations from all available tutorials & documentations. Yet when I execute the command to create a project in a folder, a dummy file is generated in my folder & am getting this scaffold error. (And weirdly this dummy file name is the last 4 chars of my profile password)