SyntaxError: Expected ',' or '}' after property value in JSON at position 54561

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/farhan/dev/omni-fe-v2/drizzle.config.ts'
SyntaxError: Expected ',' or '}' after property value in JSON at position 54561
at JSON.parse (<anonymous>)
at snapshots.reduce.malformed (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:6965:29)
at Array.reduce (<anonymous>)
at validateWithReport (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:6963:32)
at prepareMigrationFolder (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:7005:22)
at prepareAndMigratePg (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:33025:40)
at Object.handler (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:88437:13)
at async run (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:86970:7)
No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/farhan/dev/omni-fe-v2/drizzle.config.ts'
SyntaxError: Expected ',' or '}' after property value in JSON at position 54561
at JSON.parse (<anonymous>)
at snapshots.reduce.malformed (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:6965:29)
at Array.reduce (<anonymous>)
at validateWithReport (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:6963:32)
at prepareMigrationFolder (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:7005:22)
at prepareAndMigratePg (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:33025:40)
at Object.handler (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:88437:13)
at async run (/Users/farhan/dev/omni-fe-v2/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:86970:7)
Not sure what is happening here, already tried multiple drizzle version also the same
import { defineConfig } from "drizzle-kit";

export default defineConfig({
schema: "./db/schema.ts",
out: "./db/migrations",
dialect: "postgresql",
dbCredentials: {
url: process.env.NODE_ENV === "production" ? process.env.PROD_DB_URL! : process.env.DB_URL!,
},
});
import { defineConfig } from "drizzle-kit";

export default defineConfig({
schema: "./db/schema.ts",
out: "./db/migrations",
dialect: "postgresql",
dbCredentials: {
url: process.env.NODE_ENV === "production" ? process.env.PROD_DB_URL! : process.env.DB_URL!,
},
});
1 Reply
farhan
farhanOP2mo ago
already tried removing node env and hard code the db url also no luck Deleting migration sql file solves this

Did you find this page helpful?