I was testing a new command that includes a servic...
# box-products
r
I was testing a new command that includes a service that works fine when I have the module linked to the core, but I am getting a DSL error when I install through forgebox
Copy code
The target 'command-/commandbox/modules/my-package/commands.jasper.build' requested a missing dependency with a Name of 'JasperService' and DSL of 'JasperService@commandbox-jasper'
 {"ref":null,"required":true,"argName":"","dsl":"JasperService@commandbox-jasper","javaCast":null,"name":"JasperService","type":"any","value":null,"scope":"variables"}
 lucee.runtime.exp.CustomTypeException: The target 'command-/commandbox/modules/my-package/commands.jasper.build' requested a missing dependency with a Name of 'JasperService' and DSL of 'JasperService@commandbox-jasper'
I assume I am missing something simple
Updating the
modelNamespace
and
cfmapping
in ModuleConfig.cfc seems to have fixed the issue
👍🏾 1
b
@Robert Zehnder It's because the package is called
my-package
which becomes the default module name, which is what is used as the prefix for the models
👍 1
So the service's Wirebox mapping ID was actually
jaspterService@my-package
I'm guessing when you linked it, it was using a symlink of another name
While overriding the modelnamespace will "fix" this, I do recommend using the same folder names in all cases.
r
Thanks Brad
It worked fine when linked, not so much when using
box install
I have been trying to clean it up a bit