-
Notifications
You must be signed in to change notification settings - Fork 108
nuxt db migrate fails: Cannot read connection.uri from undefined #707
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When running npx nuxt db migrate, the command fails with "Cannot read properties of undefined (reading 'uri')" error. The error occurs because the code attempts to access hubConfig.db.connection.uri but the connection property doesn't exist in the database configuration object generated by NuxtHub.
Steps to reproduce
- Set up a NuxtHub project with SQLite database configured.
- Run npx nuxt db migrate command from the project root
- Observe the error after "Applying database migrations..." message
Expected behavior
The database migrations should be applied successfully without errors.
Technical Details
- Database dialect: sqlite
- Database driver: d1
- The generated config at
.nuxt/hub/db/config.jsondoesn't include a connection object under db, but the migration script expects it to exist
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working