SN CLI "snc: command not found"

jglez1
Mega Guru

Hi all, I'm having trouble getting the SN CLI working on my work laptop.

 

Something to note is that I installed via npm, i.e. npm i @Servicenow/cli -g instead of the installer because I do not have admin privileges on my work laptop.

 

Setup: 

  • Python v3.11.4
  • Node v14.21.3
  • npm v6.14.18
  • now-cli v23.0.0
  • Windows 10
  • Git BASH

So the weird thing is that when I do now-cli --version, I get a version number back and it seems to be working:

jglez1_0-1689604662053.png

 

However, the snc commands don't seem to be recognized:

jglez1_1-1689604702825.png

jglez1_2-1689604955835.png

jglez1_3-1689605147746.png

 

I realize the Now CLI docs says the CLI is only compatible with Node v12; however, I was following this and this tutorial and they both had Node v14 and were able to get it working. I have tried both Node v12 and v14, and I am experiencing the same issue.

 

Thank you,

Jorge

3 REPLIES 3

Aylee Andersen
Kilo Sage

now-cli was used originally but was replaced with snc in Quebec.  Looking at the @Servicenow/cli module on npmjs.com, it's linked to the Orlando documentation, which used the old version of the CLI (now-cli). My guess is that you have the old CLI installed instead of the new one. I'm not sure if you can install the new CLI via npm rather than the installer, but this should at least point you in the right direction and explain why you can't run snc commands.

What confuses me is the fact that now-cli --version returns 23.0.0, which according to npmjs.com, is the version for Utah / is the most up to date.

jglez1_0-1689689389424.png

 

But as you've said, now-cli was the command used prior to Quebec, so this can't be right because it's recognizing the old command, and I must in fact be using the old version.

 

I'll try to install the newest version by doing @Servicenow/cli@utah -g

 

If this doesn't work, I'll try to find the list of commands and/or documentation for the old version of the SN CLI tool so I can use the commands that work with the version I have.

 

Thanks, I appreciate you pointing me in the right direction!

Hi @jglez1, were you able fix this issue? I'm having the same exact problem