TypeError: Cannot read properties of undefined (reading 'booted') #4675
Replies: 3 comments
-
Hey @equeraltovivas! 👋🏻 You need to ensure you are using exactly the same version of Lucid between your application and your model. |
Beta Was this translation helpful? Give feedback.
-
Hi @RomainLanz , |
Beta Was this translation helpful? Give feedback.
-
I think the problem is that Lucid's BaseModel has adapter to database as a singleton property. This causes that when we move models to a shared folder between several projects it does not have adapter and it fails. How can we keep models in a shared folder between Adonis projects? |
Beta Was this translation helpful? Give feedback.
-
When I move the models to a local library, I get the following error when trying to use it for the Auth Guard.
Project estructure:
app1 package.json:
Beta Was this translation helpful? Give feedback.
All reactions