Migration to 0.14 Issue with Prisma

My Auth is not recognizing the User field from my prisma file. Here is the main wasp declaration: app Realti { wasp: { version: "^0.14.0" }, title: "Realti", auth: { userEntity: User, methods: { usernameAndPassword: { userSignupFields: import { userSignupFields } from "@src/components/Reusables/extrasignups", }, }, onAuthFailedRedirectTo: "/login", }, db: { system: PostgreSQL } } but my error is Type error: Undefined identifier: User. My Prisma is: datasource db { provider = "postgresql" url = env("DATABASE_URL") } generator client { provider = "prisma-client-js" } model User {
id Int @id @default(autoincrement()) first_name String @default("") last_name String @default("") favorites Favorite[] }
9 Replies
kapa.ai
kapa.aiβ€’3mo ago
Hi @Sam Jakshtis. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided, it seems like you're having trouble with the User entity not being recognized in your Wasp application. This could be due to a variety of reasons, such as incorrect file structure or missing imports. However, I'm afraid I can't provide a specific solution as the knowledge sources provided do not contain information directly related to your issue. I would recommend checking the Wasp documentation or their GitHub issues for similar problems. It might also be helpful to ensure that your Prisma schema is correctly set up and that the User model is properly imported in your Wasp files. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Sam Jakshtis, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
mihoβ€’3mo ago
What is your Wasp version? Run wasp version to see it
Sam Jakshtis
Sam Jakshtisβ€’3mo ago
@miho Haha my b, just need to download new version correct? I am on 13.2
miho
mihoβ€’3mo ago
Yep yep, just run curl -sSL https://get.wasp-lang.dev/installer.sh | sh to upgrade πŸ˜„
Sam Jakshtis
Sam Jakshtisβ€’3mo ago
@miho Done, but getting this error? (Also documenting should anyone else experience similar difficulties). git:(main) βœ— wasp db migrate-dev 🐝 --- Compiling wasp project... -------------------------------------------------- ❌ --- [Error] Your wasp project failed to compile: ------------------------------- - /Users/samueljakshtis/Desktop/github/Realti/main.wasp @ 16:13-22 Type error: Undefined identifier: PostgreSQL 15 | db: { 16 | system: PostgreSQL, 17 | }
miho
mihoβ€’3mo ago
There is a migration guide that will help you go from 0.13.2 to 0.14.0: https://wasp-lang.dev/docs/migrate-from-0-13-to-0-14 πŸ™‚ let me know if that helps
Migration from 0.13.X to 0.14.X | Wasp
This guide only covers the migration from 0.13.X to 0.14.X. If you are migrating from 0.11.X or earlier, please read the migration guide from 0.11.X to 0.12.X first.
Sam Jakshtis
Sam Jakshtisβ€’3mo ago
@miho Yes I have been following it, do the queries and actions on mani.wasp stay the same? Also on the userEntity
MEE6
MEE6β€’3mo ago
Wohooo @Sam Jakshtis, you just became a Waspeteer level 4!
Sam Jakshtis
Sam Jakshtisβ€’3mo ago
Ah figured it out, needed to remove db system
Want results from more Discord servers?
Add your server