SN CLI Generate UI Component cannot find file or directory '.snc/.extensions/ui-component/node_modules/@servicenow/generator-ui-component/lib/generators'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 03:07 PM
Issue:
I am attempting to make a custom component for the UI Builder. I am following this creatercon course or even this blog post to install the ui-component plugin. I am getting this error when I go to create a new component. It is almost as if the versions are off and are looking for a file in the wrong place.
Any help would be appreciated.
Thank you
Command:
snc ui-component project --name @prefix/component-name --description 'Description' --scope x_prefix_scope_name
(Obviously I renamed some of the values in the command. The command is not the issue)
Error:
File Location:
SN CLI Version:
Python, Node, & NPM Version:
Python 2.7.18
OS Version:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2022 10:28 AM
Looks like there are some stale entries from previous installations.
Solution:
Uninstall and install ui-component extension of snc
// 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
‎02-01-2023 09:52 AM
This worked for me too. However its absolutely unbelievable that this workaround is needed for a fresh install of the CLI.