Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

SN CLI Generate UI Component cannot find file or directory '.snc/.extensions/ui-component/node_modules/@servicenow/generator-ui-component/lib/generators'

Daniel Cudney1
Kilo Contributor

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:

find_real_file.png

File Location:

find_real_file.png

SN CLI Version:

find_real_file.png

Python, Node, & NPM Version:

find_real_file.png

Python 2.7.18

OS Version:

find_real_file.png

6 REPLIES 6

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

This worked for me too. However its absolutely unbelievable that this workaround is needed for a fresh install of the CLI.