Error with drizzle-kit generate:pg

Transforming const to the configured target environment ("es5") is not supported yet
4 Replies
Mohammed Anas
Mohammed Anas15mo ago
pnpm drizzle-kit generate:pg drizzle-kit: v0.19.12 drizzle-orm: v0.28.1
No config path provided, using default 'drizzle.config.ts'
Reading config file '/home/anasmohammed361/vs/driz-test/frontend/drizzle.config.ts'
Error: Transform failed with 1 error:
/home/anasmohammed361/vs/driz-test/frontend/src/db/schema.ts:3:7: ERROR: Transforming const to the configured target environment ("es5") is not supported yet
at failureErrorWithLog (/home/anasmohammed361/vs/driz-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1649:15)
at /home/anasmohammed361/vs/driz-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:847:29
at responseCallbacks.<computed> (/home/anasmohammed361/vs/driz-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:703:9)
at handleIncomingPacket (/home/anasmohammed361/vs/driz-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:762:9)
at Socket.readFromStdout (/home/anasmohammed361/vs/driz-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:679:7)
at Socket.emit (node:events:514:28)
at addChunk (node:internal/streams/readable:343:12)
at readableAddChunk (node:internal/streams/readable:316:9)
at Readable.push (node:internal/streams/readable:253:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
errors: [
{
detail: undefined,
id: '',
location: [Object],
notes: [],
pluginName: '',
text: 'Transforming const to the configured target environment ("es5") is not supported yet'
}
],
warnings: []
}
No config path provided, using default 'drizzle.config.ts'
Reading config file '/home/anasmohammed361/vs/driz-test/frontend/drizzle.config.ts'
Error: Transform failed with 1 error:
/home/anasmohammed361/vs/driz-test/frontend/src/db/schema.ts:3:7: ERROR: Transforming const to the configured target environment ("es5") is not supported yet
at failureErrorWithLog (/home/anasmohammed361/vs/driz-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1649:15)
at /home/anasmohammed361/vs/driz-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:847:29
at responseCallbacks.<computed> (/home/anasmohammed361/vs/driz-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:703:9)
at handleIncomingPacket (/home/anasmohammed361/vs/driz-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:762:9)
at Socket.readFromStdout (/home/anasmohammed361/vs/driz-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:679:7)
at Socket.emit (node:events:514:28)
at addChunk (node:internal/streams/readable:343:12)
at readableAddChunk (node:internal/streams/readable:316:9)
at Readable.push (node:internal/streams/readable:253:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
errors: [
{
detail: undefined,
id: '',
location: [Object],
notes: [],
pluginName: '',
text: 'Transforming const to the configured target environment ("es5") is not supported yet'
}
],
warnings: []
}
config
import type { Config } from "drizzle-kit";
export default {
schema: "src/db/schema.ts",
driver: 'pg',
out:"migrations/"
} satisfies Config;


import type { Config } from "drizzle-kit";
export default {
schema: "src/db/schema.ts",
driver: 'pg',
out:"migrations/"
} satisfies Config;


Mohammed Anas
Mohammed Anas12mo ago
Update your tsconfig
SirCameron
SirCameron12mo ago
That's what I posted...
Want results from more Discord servers?
Add your server