Error when trying to generate a migration schema

anyone any ideas to what the problem is? It was working fine yesterday and now it throws an error when I am trying to generate a migration file. I was updating the relationships/adding a new table and when I tried generate a migration file, this error appeared this is the script i'm running "generate": "cross-env NODE_ENV=development drizzle-kit generate:pg --config=drizzle.config.ts",
import { Config } from "drizzle-kit";

export default {
schema: "./src/modules/drizzle/schemas",
driver: "pg",
dbCredentials: {
connectionString: `postgres://${process.env.PG_USER}:${
process.env.PG_PASSWORD
}@${process.env.PG_HOST}${
process.env.NODE_ENV === "docker" ? `:${process.env.PG_PORT}` : ""
}/${process.env.PG_DATABASE}`,
},
out: "./.drizzle",
} satisfies Config;
import { Config } from "drizzle-kit";

export default {
schema: "./src/modules/drizzle/schemas",
driver: "pg",
dbCredentials: {
connectionString: `postgres://${process.env.PG_USER}:${
process.env.PG_PASSWORD
}@${process.env.PG_HOST}${
process.env.NODE_ENV === "docker" ? `:${process.env.PG_PORT}` : ""
}/${process.env.PG_DATABASE}`,
},
out: "./.drizzle",
} satisfies Config;
``` Reading config file '/munchies/server/drizzle.config.ts' Error: Transform failed with 1 error: errors: [ { detail: undefined, id: '', location: [Object], notes: [], pluginName: '', text: 'Transforming JavaScript decorators to the configured target environment ("es2021") is not supported yet' } ], warnings: [] }
4 Replies
tc
tc13mo ago
Hey there, did you ever solve this? I'm running into the same problem.
NinjaBunny
NinjaBunnyOP13mo ago
There was something wrong with that version of drizzle if I’m not mistaken It happened a bit ago, but I think that’s what was wrong with the version of drizzle-kit
tc
tc13mo ago
gotcha thanks for the response
NinjaBunny
NinjaBunnyOP13mo ago
I’m not 100% sure if that was the cause of it, but I know it magically started working again once I updated the package for drizzle-kit
Want results from more Discord servers?
Add your server