-
-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Sharing Schema/Types #3028
Comments
I reproduce this exact issue. I need to share my schema between 2 projects. |
Same typing error here, but for example |
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 |
Can you detail your setup please ? |
I mostly just followed this guide here. My current repo structure looks like this:
|
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)The text was updated successfully, but these errors were encountered: