drizzle-team / drizzle-team/drizzle-orm

[BUG]: Cannot create migrations when using: import "server-only"

Open
#1,844 4 comments 3 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

### What version of `drizzle-orm` are you using?

0.29.3

### What version of `drizzle-kit` are you using?

0.20.13

### Describe the Bug

Clone repo https://github.com/gnllucena/drizzle-import-server-only

`bun install`
`bun run migration:generate`

The command will only create the `meta` folder and the `_journal.json` file on `src/server/data/migrations/` folder.

If you remove the `import “server-only”` from `src/server/data/schema/customers-schema.ts` you’ll notice that the migrations are generated normally.

### Expected behavior

The migrations should be created when schema uses `import "server-only"`

### Environment & setup

OS: macOS 14.2.1 23C71 arm64
Kernel: 23.2.0
Shell: fish 3.5.0

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.