-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
DB schema is not generated on nuxt prepare hook.
Lines 237 to 241 in 7e00657
| if (!nuxt.options._prepare) { | |
| nuxt.hooks.hookOnce('app:templatesGenerated', async () => { | |
| await buildDatabaseSchema(nuxt.options.buildDir, { relativeDir: nuxt.options.rootDir }) | |
| }) | |
| } |
The problem is that I have a CI setup with nuxt typecheck command. And it fails when I use any binding from DB because types are not generated yet.
Steps to reproduce
Steps to reproduce the behavior:
- Use types from
hub:db(or auto-imports). - Remove
.nuxtfolder and make clean deps install. - Run
nuxt typecheck
Expected behavior
Schema is generated either on nuxt prepare or nuxt typecheck. I think better solution would be generate it on prepare hook, because if it's not generated after deps installation, then VS Code will show type errors until you run dev script.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working