Skip to content
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

Migration from v0.14.0 to v0.15 leads Prisma errors #2365

Open
rajkrajpj opened this issue Nov 4, 2024 · 3 comments
Open

Migration from v0.14.0 to v0.15 leads Prisma errors #2365

rajkrajpj opened this issue Nov 4, 2024 · 3 comments

Comments

@rajkrajpj
Copy link

rajkrajpj commented Nov 4, 2024

Describe the bug
.wasp/out/sdk/wasp/node_modules/.prisma/client/default.d.ts Is not updated to include the defined prisma schema tables. So starting the wasp server leads to getting error: Module '"@prisma/client"' has no exported member

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15'
  2. Follow migration steps
  3. Run wasp start or npx prisma migrate
  4. .wasp/out/sdk/wasp/entities/index.ts is visibly getting errors: Module '"@prisma/client"' has no exported member "model"

Expected behavior
.wasp/out/sdk/wasp/entities/index.ts and .wasp/out/sdk/wasp/node_modules/.prisma/client/default.d.ts should be to have generated the defined prisma schema tables

Screenshots
Screenshot 2024-11-04 at 4 19 23 PM

Screenshot 2024-11-04 at 4 19 00 PM

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
When using wasp version 0.14.2: The contents of node_modules/.prisma/client/index.d.ts Are being generated correctly.

When in wasp version 0.15.0: The contents are missing the defined prisma schema contents

@infomiho
Copy link
Contributor

infomiho commented Nov 5, 2024

You shouldn't run npx prisma migrate with Wasp, only wasp db migrate-dev. Did you try running that command?

@rajkrajpj
Copy link
Author

@infomiho thank you for responding! 🙏

Yes I have tried that as well but the generated .wasp/out/sdk/wasp/node_modules/.prisma/client/default.d.ts
Screenshot 2024-11-05 at 11 06 30 PM

Does not generate the prisma schema I have defined.

Sidenote: The .wasp/out/db/schema.prisma matches the schema.prisma I have in the root

@Martinsos
Copy link
Member

Does wasp clean maybe help?

Also, does your project compile otherwise?

Can you share althe output from the terminal that you get when you run wasp start?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants