componentsjs-generator outputs the error "Could not load class or interface or other type Omit from ..." #139
-
Hello, I'm interested in CommunitySolidServer and am learning TypeScript and Components.js. I want to test AccountLoginStorage in CSS to add a new login method. hello-world-component:src/HelloWorld.ts
hello-world-component:config/hello-world.json
The above program was based on BasePasswordStore.ts.
Maybe it's because I don't have enough knowledge about TypeScript types, but I can't figure out what's wrong. You can see the complete diff in my github repository, which I created by forking hello-world-component. CommunitySolidServer/hello-world-component@main...ksaito-hiu:hello-world-component:main I would be very grateful if you could give me some advice. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The problem is a consequence of this issue: LinkedSoftwareDependencies/Components-Generator.js#80. The Components.js generator has problems with native Node.js builtins, such as Although your class does not use |
Beta Was this translation helpful? Give feedback.
-
Thank you very much. I could fix the bug by adding "Omit" entry in .componentsignore! I still don't understand why the "Omit" type is involved, but thanks to joachimvh's advice I think I can go ahead and understand it better. In case others may refer this Discussion, I would like to point out that the hello-world.json I presented above contained another bug.
Thank you very much for your accurate advice. |
Beta Was this translation helpful? Give feedback.
The problem is a consequence of this issue: LinkedSoftwareDependencies/Components-Generator.js#80. The Components.js generator has problems with native Node.js builtins, such as
Omit
. You can tell it to ignore such classes by having a.componentsignore
file and adding-i .componentsignore
to yourcomponents-generator
call and having a JSON array where each entry is a string corresponding to a class/interface the Components.js generator should ignore. So in this case you would[ "Omit" ]
in that file. The hello world example already has such a file where you can just fill this in.Although your class does not use
Omit
, you are depending on a class that does, causing this issue. You can see…