New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lb4 relation doesn't find models #9653
Comments
This is the error that the CLI gives:
Visiting the page provided doesn't actually give any information about how models are discovered. |
Exactly and even more there Is no way I can make it to look in the subdirectories. Which means that if I am using 100 models for different purposes all of them should be in the same directory. |
@loopback/boot is able to find artifacts in nested folders. I wonder if same type of artifact discovery could be used for @loopback/cli to find models/repositories in nested folders. |
I confirm lb4 is not able to find models in subdirectory. Not really a bug, but a nice to have feature. |
It could definitely make organization a lot easier as a service grows. |
Describe the bug
I have a project with a lot of models. I organized the models in "sub directories" inside "models" directory.
The "export" is working properly and all the project is working.
What is not working is the possibility to add repositories, relations or anything else
"lb4 relation" stops with an error "Generation is aborted: Error: No models found in ".../src/models"."
I expect the script to be capable to look for models also inside according to what is available in "index.ts" from "models" directory.
Logs
No response
Additional information
No response
Reproduction
https://github.com/danysz/demo-lb4-cli-model-not-found
The text was updated successfully, but these errors were encountered: