Open Stephane-Pires opened 1 month ago
I reproduce this exact issue. I need to share my schema between 2 projects. The only workaround I found is to duplicate the schema declaration in both projects...
Same typing error here, but for example select
returns correct values.
I am having the same issue... tried creating a package for my schema to use between my two web apps
I found a temporary solution. Since the issue seems to be with the fact that TypeScript can not validate them since they are separate packages, one can use NPM workspaces, this way it will use the "same" package
I found a temporary solution. Since the issue seems to be with the fact that TypeScript can not validate them since they are separate packages, one can use NPM workspaces, this way it will use the "same" package
Can you detail your setup please ? I tried with workspaces without success
I found a temporary solution. Since the issue seems to be with the fact that TypeScript can not validate them since they are separate packages, one can use NPM workspaces, this way it will use the "same" package
Can you detail your setup please ? I tried with workspaces without success
I mostly just followed this guide here.
My current repo structure looks like this:
my-monorepo
- package.json
- node_modules/
- packages/
- drizzle-schema/
- webapp_1/
- webapp_2/
What version of
drizzle-orm
are you using?0.33.0
What version of
drizzle-kit
are you using?0.23.1
Describe the Bug
Hello ! Overall wonderful library, you really helped me understand SQL, and databases.
Context 💭
Sveltekit
Application (named :app
)package-schema
) that i consume insideApp
by doingnpm link Package
Configuration 🛞
App
drizzle-orm
:0.33.0
typescript
:5.6.2"
package-schema
drizzle-orm
:0.33.0
drizzle-zod
:0.5.1
typescript
:5.6.2
The ERROR (maybe BUG) 🐛
The error from typescript
What I have tried 🤔
app
or onpackage-schema
, didn't work.app
THIS IS WORKING and resolving the issue 👍 (But I don't want my schemas to live in theapp
projectHelp needed 🙏
Thanks again for this wonderful projet ! You rocks
Expected behavior
I expect to be able to share
schema
andtypes
between project without having issues regarding typing.Environment & setup
vscode
: 1.93.1macos
: 15.0 (24A335)