Some issue when try to use ui-component to set up the project.

Tom Jia
Tera Contributor

I am trying to follow the instruction on the link, try to set up a project by using ui-component. I successfully add the extension: ui-component, but when I run this command in a empty folder: 

snc ui-component project --name @myorg/hello-world --scope x_myorg_helloworld --offline

It shows the error: 

no such file or directory, scandir 'C:\Users\'my-user-name'\.snc\.extensions\ui-component\node_modules\@servicenow\generator-ui\lib\generators'

 

I try to use nvm to control the node and npm version, but it failed to run this command. I also check the pass, but there is no lib\generators in that file.

Node: 20.5.1

npm: 9.8.0

snc: 1.10 and ui-component: 23.0.0

Can someone help me resolve this problem, thanks a lot.

1 REPLY 1

IronPotato
Mega Sage

Hi @Tom Jia ,

 

did you manage to find solution to this? I have the same issue. 

 

What I did was, I created lib folders in both generator-ui and generator -ui-component and moved generators into that folders, but now I'm getting different error:

 

Cannot find module 'C:\Users\<my user name>\.snc\.extensions\ui-component\node_modules\@servicenow\generator-ui-component\generators\app\index.js'. Please verify that the package.json has a valid "main" entry.