[BUG]: Please install latest version of "drizzle-orm" - with latest Drizzle version
Problem
What version of `drizzle-orm` are you using? 0.32.1 What version of `drizzle-kit` are you using? 0.23.0 Describe the Bug Steps to Reproduce: 1. Created a new package within my npm workspace dedicated to database handling. 2. Set up a new Drizzle configuration, ensuring I installed the latest versions of both `drizzle-orm` and `drizzle-kit`. 3. Ran the command `npx drizzle-kit generate:pg`. Actual Behavior: I consistently receive the following error message: [code block] Additional Information: npm workspace structure: [code block] Operating System: Windows 10 Node.js version: 20.10.0 Possible Workarounds: Tried updating all `drizzle-orm` dependencies in my workspace to the latest version, but the issue persists. Notes: Currently i downgraded to: [code block] But the issue on this versions is, drizzle studio does not work... ist very frustrating This issue seems similar to the one reported in [#406](https://github.com/drizzle-team/drizzle-kit-mirror/issues/406), but the solution there did not resolve my problem. It could be a dependency resolution issue within the npm workspace. Expected behavior Drizzle should work without errors. Environment & setup _No response_
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Update drizzle-orm and drizzle-kit to Compatible Versions
The issue arises from a version mismatch between `drizzle-orm` and `drizzle-kit`. The installed versions (0.32.1 for `drizzle-orm` and 0.23.0 for `drizzle-kit`) are not compatible, leading to errors during the execution of commands. This is often due to breaking changes or dependency resolution issues in npm workspaces.
Awaiting Verification
Be the first to verify this fix
- 1
Check Current Versions
Verify the currently installed versions of `drizzle-orm` and `drizzle-kit` in your npm workspace.
bashnpm list drizzle-orm drizzle-kit - 2
Update drizzle-orm and drizzle-kit
Update both `drizzle-orm` and `drizzle-kit` to their latest compatible versions. Check the official documentation or repository for the latest stable versions.
bashnpm install drizzle-orm@latest drizzle-kit@latest --workspace=<your-database-package> - 3
Clear npm Cache
Clear the npm cache to avoid any stale package issues that might affect the installation.
bashnpm cache clean --force - 4
Reinstall Node Modules
Remove the `node_modules` directory and reinstall all dependencies in your npm workspace to ensure a clean state.
bashrm -rf node_modules && npm install - 5
Run Drizzle Command
After updating and reinstalling, run the command again to generate the necessary files.
bashnpx drizzle-kit generate:pg
Validation
Confirm that the command `npx drizzle-kit generate:pg` executes without errors. Additionally, check the generated files to ensure they are created correctly.
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep