drizzle-team / drizzle-team/drizzle-orm

[BUG]: Drizzle-orm/typebox - TypeError: Class extends value undefined is not a constructor or null

Open
#5,981 2 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Report hasn't been filed before.

- [x] I have verified that the bug I'm about to report hasn't been filed before.

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

1.0.0-rc.4

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

1.0.0-rc.4

### Other packages

typebox@1.3.3

### Describe the Bug

TypeError: Class extends value undefined is not a constructor or null when using drizzle-orm/typebox with typebox@^1.3.x

Error:
```
TypeError: Class extends value undefined is not a constructor or null
at node_modules/drizzle-orm/typebox/column.cjs
```

To reproduce:

1. Install drizzle-orm@1.0.0-rc.4 and typebox@1.3.3
2. Import anything from drizzle-orm/typebox via CJS or mixed CJS/ESM (e.g., via tsx)
3. The crash occurs immediately at module load time

**Expected behaviour**: drizzle-orm/typebox should work with typebox@1.x in Node.js CJS/mixed module environments.

Contributor guide

Open the contributing guide

Research direction

Reproduce with drizzle-orm@1.0.0-rc.4, drizzle-kit@1.0.0-rc.4, and typebox@1.3.3, then inspect node_modules/drizzle-orm/typebox/column.cjs and the import path used by drizzle-orm/typebox. Verify both CJS and mixed CJS/ESM loading; done means importing from drizzle-orm/typebox no longer throws the reported TypeError in Node.js.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.