Error with drizzle-kit generate:pg
Transforming const to the configured target environment ("es5") is not supported yet
4 Replies
pnpm drizzle-kit generate:pg
drizzle-kit: v0.19.12
drizzle-orm: v0.28.1
config
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: []
}
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 did you find a solution to this?
https://discord.com/channels/1043890932593987624/1129815909675040831/1130508272512806974
Update your tsconfig
That's what I posted...