Fjeldstad
DTDrizzle Team
•Created by Fjeldstad on 2/13/2024 in #help
Missing dependency on drizzle-orm in drizzle-kit?
I'm using NPM workspaces, and for some reason when I installed
drizzle-orm
it was placed in the node-modules
of that specific workspace, rather than the root. I think it was due to a conflict of the react
peer dependency (why is an ORM even depending on React?) - I have an older verison of React already installed and located in the root node_modules
.
Anyway, when I installed drizzle-kit
as a dev dependency, it installed it in the root node_modules
. Then when I run drizzle-kit generate:pg
, it fails to resolve drizzle-orm/pg-core
- probably related to the fact that that module is located in a workspace-local node_modules
, but not sure.
This is the rough structure that I ended up with after running npm install drizzle-orm --workspace my-workspace
and npm install --save-dev drizzle-kit --workspace my-workspace
:
And again, running npm exec --workspace my-workspace -- drizzle-kit generate:pg
(or through an NPM script in /workspaces/my-workspace/package.json
) results in a module resolution error:
Has anyone stumbled into this? Any suggestions on2 replies