Some issue when try to use ui-component to set up the project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2023 09:57 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2023 11:44 AM
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.