nuxt-hub / starter

Nuxt template to build a full-stack application on Cloudflare, with zero configuration.
93 stars 6 forks source link

defineNitroPlugin is not defined #4

Open evertontst opened 1 month ago

evertontst commented 1 month ago

When I tried to use this the migrations.ts I got this error

My code is: import { consola } from "consola"; import { migrate } from "drizzle-orm/d1/migrator";

export default defineNitroPlugin(async () => { if (!import.meta.dev) return;

onHubReady(async () => { await migrate(useDrizzle(), { migrationsFolder: "server/database/migrations", }) .then(() => { consola.success("Database migrations done"); }) .catch((err) => { consola.error("Database migrations failed", err); }); }); });

Atinux commented 1 month ago

Could you update your dependencies and try again?