drizzle-team / drizzle-team/drizzle-orm

Transforming const to the configured target environment ("es5") is not supported yet

Open
#3,487 3 comments 0 reactions 0 assignees View on GitHub
bug drizzle/kit
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

Running drizzle-kit on a fresh nextjs typescript repo errors out:

```sh
> drizzle-kit generate:pg

drizzle-kit: v0.19.13
drizzle-orm: v0.28.6

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/bas/REPOS/booleanart/drizzle.config.ts'
Error: Transform failed with 2 errors:
/Users/bas/REPOS/booleanart/src/database/schema.ts:12:7: ERROR: Transforming const to the configured target environment ("es5") is not supported yet
/Users/bas/REPOS/booleanart/src/database/schema.ts:33:7: ERROR: Transforming const to the configured target environment ("es5") is not supported yet
```

This should not happen as target:es5 is the correct one for NextJS (for now).
Issue is esbuild is complaining (while TypeScript will happily transpile target:es5 for const).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.