I have a project abcd can uses Components.Js for which I create typescript plugins that I can inject with success in my project. All works fine. Now I try to create these typescript plugins in a separate project abcddemo also with Components.js. I need to include abcd as a dependency (because I need some interfaces and helper functions). All works well as long as I don't have a package name that starts with an a or ab or abc. When I use abcddemo as package name and run a demo test I get as error:
> koreografeyeplugindemo@1.0.0 demo
> node dist/demo.js
2023-03-30T07:06:29.378Z [Components.js] error: Detected fatal error. Generated 'componentsjs-error-state.json' with more information.
/Users/hochsten/github.com/eyereasoner/KoreografeyePluginDemo/node_modules/componentsjs/lib/preprocess/ConfigPreprocessorComponent.js:32
throw new ErrorResourcesContext_1.ErrorResourcesContext(`Could not find (valid) component types for config "${config.value}" among its types, or a requireName`, {
^
ErrorResourcesContext: Could not find (valid) component types for config "urn:my-package:myInstance" among its types, or a requireName
at ConfigPreprocessorComponentMapped.canHandle (/Users/hochsten/github.com/eyereasoner/KoreografeyePluginDemo/node_modules/componentsjs/lib/preprocess/ConfigPreprocessorComponent.js:32:23)
at ConfigPreprocessorComponentMapped.canHandle (/Users/hochsten/github.com/eyereasoner/KoreografeyePluginDemo/node_modules/componentsjs/lib/preprocess/ConfigPreprocessorComponentMapped.js:28:38)
at ConfigConstructorPool.getRawConfig (/Users/hochsten/github.com/eyereasoner/KoreografeyePluginDemo/node_modules/componentsjs/lib/construction/ConfigConstructorPool.js:70:53)
at ConfigConstructorPool.instantiate (/Users/hochsten/github.com/eyereasoner/KoreografeyePluginDemo/node_modules/componentsjs/lib/construction/ConfigConstructorPool.js:48:34)
But, when I rename my package to xbcddemo and rebuild and rename the contexts in config.jsonld everything works well
Issue type:
Description:
I have a project abcd can uses Components.Js for which I create typescript plugins that I can inject with success in my project. All works fine. Now I try to create these typescript plugins in a separate project abcddemo also with Components.js. I need to include abcd as a dependency (because I need some interfaces and helper functions). All works well as long as I don't have a package name that starts with an a or ab or abc. When I use abcddemo as package name and run a demo test I get as error:
But, when I rename my package to xbcddemo and rebuild and rename the contexts in
config.jsonld
everything works wellEnvironment:
OSX.
Crash log:
componentsjs-error-state.json.zip