Next Experience ServiceNow CLI Install Failure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hello All,
I am trying to install ServiceNow CLI in my local MAC terminal . I used these commands:
node -v (v22.21.1)
npm -v (8.5.5)
npm install @Servicenow/cli -g
The installation succeeds throwing some warnings but when I hit
snc --version
then it says zsh: command not found: snc
Did anybody face this issue recently and know a way around it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi,
Here’s what’s happening from what I can see and how to possibly fix it:
The zsh: command not found: snc error usually means the CLI got installed, but your terminal doesn’t know where to find it.
Steps I found to fix:
Find where npm installed the CLI:
npm bin -g
This will show the folder where globbal npm executables live.
Add that folder to your PATH:
Open your .zshrc file:
nano ~/.zshrc
Add this line (replace the path with what npm bin -g showed):
export PATH=$PATH:/usr/local/bin
Save and reload:
source ~/.zshrc
Check again:
snc --version
After this, your terminal should recognize the snc command.
If it still doesn’t work, it might be worth reinstalling the CLI globally with npm and making sure there are no permission errors. I'm here if you have any issues!
@Abhishek59 - Please mark as Accepted Solution and Thumbs Up if you found Helpful!!