- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2022 06:07 PM
Hi,
I have written a basic custom component to display some HTML elements. I have created a servicenow cli profile, able to connect to the instance using snc, npm install was successful. I have below app versions in my local:
npm: '6.13.4'
Node.js v12.16.1
"ui-component": "21.0.7"
"snc": "1.1.0"
Now, When I run the command snc ui-component develop --entry ./element.js --open true --port 3001. I'm getting the following error. I have tried upgrading or downgrading the app versions, tried installing keytar but it is still throwing error.
PS C:\Users\kpechetti\Desktop\m365-snow-va-latest\m365supportintegration-snow> snc ui-component develop --entry ./element.js --open true --port 3001
internal/modules/cjs/loader.js:1208
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: Module did not self-register: '\\?\C:\Users\kpechetti\.snc\.extensions\ui-component\node_modules\keytar\build\Release\keytar.node'.
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1208:18)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (C:\Users\kpechetti\.snc\.extensions\ui-component\node_modules\keytar\lib\keytar.js:1:14)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
Can someone please help resolve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 05:45 AM
Once keytar is installed globally, please uninstall and install ui-component extension of snc. This would help ui-component pick the right keytar module.
// Remove ui-component
snc extension remove
Extension name: ui-component
// Add ui-component
snc extension add
Extension name: ui-component
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 05:45 AM
Once keytar is installed globally, please uninstall and install ui-component extension of snc. This would help ui-component pick the right keytar module.
// Remove ui-component
snc extension remove
Extension name: ui-component
// Add ui-component
snc extension add
Extension name: ui-component
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 02:12 PM
Thank you so much Shasank, your solution worked for me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 06:39 AM
Thank You @Shasank
After uninstalling the ui-component extension, it now fails to reinstall again.
$ snc extension add --name ui-component
NPM version 10.2.0 found, expected >= 6.13.4
Can't add extension ui-component. Please try again.
Any Ideas why? The Version 10.2.0 is definitely a later version than 6.13.4...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 12:09 PM
Hi Bj,
the current UI-component extension is not compatible with node versions greater than 14, I have tried with node version 14.21.3 and npm version 6.14.18, which worked fine can you try the same
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2025 02:15 PM
I had this same error today, and your recommended versions worked for me too. Do you know of any plans to update support for later versions of NodeJS & NPM?