Trouble installing ServiceNow CLI (UI-Component)

Marc4
Tera Expert

Hi, when I try to install ui-component I get this error on Windows 11 with node v20.9.0

c:\tmp> snc extension add --name ui-component
NPM version 10.2.3 found, expected >= 6.13.4
Can't add extension ui-component. Please try again.

 

please help!

 

I found the solution by installing that specific version of npm but I get a lot of warnings for deprecated modules

2 REPLIES 2

douglasmines
Tera Contributor

I've just experienced the same issue - whilst taking the course "Introduction to External Component Development - San Diego"

Not being familiar with NPM at all, so take this with a pinch of scepticism, I've installed an earlier version of NPM also (thanks for your tip) by first running "npm install -g npm@9.9.4" before installing the extension, then running "npm install -g npm@latest" afterwards to return NPM back to latest version
I didn't get any dependency warnings whilst doing this.
Additionally, I had to skip forward in the course to setting up a profile before I could verify that the extension had been installed.
I'm going to assume that as it's letting me continue (I'm now at the activity steps) that this has resolved in much the same way. I suspect that the first character is being checked ("1" < "6") which is why downgrading to 9.9.4 also works

 

Also, apologies for hijacking an old post, just this is the top result when searching for the exact error message

RaviRajaM
Tera Contributor

I am about to create a new UI component, and I got the following error: 
NPM version 10.9.2 found, expected >= 6.13.4
Can't add extension ui-component. Please try again.

I resolved this error, after downgrading the NPM with command - npm install -g npm@6.13.4 and it solved the issue.