NotMe
NotMe
TTCTheo's Typesafe Cult
Created by NotMe on 5/10/2023 in #questions
Firebase deployment
I found the root cause and solution: So basically in my project structure I had a prisma folder and inside that schema.prisma file and when I ran firebase deploy the schema.prisma file was not getting uploaded to firebase function and hence my post install script of prisma generate was failing so the work around here is to include this in firebase.json
"predeploy":[ "cp prisma/schema.prisma .firebase/${YOUR PROJECT NAME}/functions/schema.prisma" ]
"predeploy":[ "cp prisma/schema.prisma .firebase/${YOUR PROJECT NAME}/functions/schema.prisma" ]
This copies schema file and puts it into functions folder note to replace your project name before using this. After this you can use this script in package.json:
"postinstall": "npx prisma generate --schema=schema.prisma",
"postinstall": "npx prisma generate --schema=schema.prisma",
This will run npx prisma generate after deployment and we are also mentioning where our prisma file location is I hope this saves hours of searching
16 replies
TTCTheo's Typesafe Cult
Created by NotMe on 5/10/2023 in #questions
Firebase deployment
Okay so today I remove prisma from code and just ran firebase deploy and i see that normal trpc routes are working fine it's just that prisma error whenever I include prisma in trpc context it gives that error so year on cloud function prisma is not getting deployed i found this thread people trying to deploy prisma on cloud function but don't know how i can use their solution in my project like they refer to Google cf code base of prisma but there are some shell script and all i didn't understood well Here is the discussion link i am talking about they were facing same issue https://github.com/prisma/prisma/discussions/2106
16 replies
TTCTheo's Typesafe Cult
Created by NotMe on 5/10/2023 in #questions
Firebase deployment
Do you know what I am doing wrong here?
16 replies
TTCTheo's Typesafe Cult
Created by NotMe on 5/10/2023 in #questions
Firebase deployment
16 replies
TTCTheo's Typesafe Cult
Created by NotMe on 5/10/2023 in #questions
Firebase deployment
16 replies
TTCTheo's Typesafe Cult
Created by NotMe on 5/10/2023 in #questions
Firebase deployment
16 replies
TTCTheo's Typesafe Cult
Created by NotMe on 5/10/2023 in #questions
Firebase deployment
16 replies
TTCTheo's Typesafe Cult
Created by NotMe on 5/10/2023 in #questions
Firebase deployment
Yeah so here are some screen shots which might help
16 replies