drizzle-team / drizzle-team/drizzle-orm

Bug: fails with 'Cannot read properties of undefined (reading 'value')'

Open
#5,117 2 comments 0 reactions 0 assignees View on GitHub
bug/cant-reproduce
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Description

When running `drizzle-kit generate`, the command fails with the error `Cannot read properties of undefined (reading 'value')`. This happens even with an empty schema file and a minimal `drizzle.config.ts` file.

### Steps to Reproduce

1. Clone the reproduction repository: `git clone https://github.com/G77-BOT/drizzle-bug-repro.git`
2. `cd drizzle-bug-repro`
3. `npm install`
4. `npm run db:generate`

### Expected Behavior

The `drizzle-kit generate` command should succeed, even with an empty schema file.

### Actual Behavior

The command fails with the error `Cannot read properties of undefined (reading 'value')`.

### Environment

- Drizzle-kit version: 0.20.14
- Drizzle-orm version: 0.39.3
- Next.js version: 16.0.8
- Node.js version: 18.19.123
- OS: macOS

### Additional Context

I have tried the following with no success:
- Updating `drizzle-kit` and `drizzle-orm` to the latest versions.
- Simplifying the schema file to an empty file.
- Simplifying the `drizzle.config.ts` file.
- Setting a dummy `DATABASE_URL` in an `.env` file.
- Cleaning the `node_modules` directory and re-installing all dependencies.

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.