PrismaClientInitializationError
Hey can anybody please help me out with this, i've tried rechecking the .env file, restarted servers, "stack overflow"d for hours...please do kindly help me out here.
32 Replies
Hi @Arkana 👋
What does your connection string look like for your environment variable
DATABASE_URL
?
I can see that your provider is sqlite
. Your connection string should look like
yes it does
probably shouldn't have uploaded the .env file lol but i really need this fixed asap
@RaphaelEtim
You mad bro. Remove this
i think this should do!
You using an sql lite db?
First go setup a proper db. Postgres or SQl. Then Put the details in. Then go from there. No one really using sqlite in production.
I would not spend hours trying to fix that
i just need this to work! TwT
not for production tbf
What framework are you using? nextjs?
Just came across this, might be relevant to your use case
yes
ohhh! alr
thanks a ton man :)
Im currently also trying to get it working on nextjs with app directory
Not fun at all. Not sure why but they are still not edge compatible
well one needs to add this to their package.json
also take care of typesafety
fml
yeah man true, new day new bug :3
Yeah it's always been quite clunky. I was willing to deal with that. But this is the final straw for me
I will report if I find a solution
i tried drizzle lmao, faced a few issues there too smh
yeah i got rid of sqlite and going for postgres
any clue about this error mate?
Thats to do with the encoding in your strings
Check you might have some stuff where you are writing words or text on your page
You need to use escape characters instead of apostrophes etc
You can usually also get around it by using certain brackets and things
There are various strategies to avoid it. Just give it a google. Usually happens when you typing text directly into the components like that
You can create seperate config files for your website then import those variables. It works well and is a neat way to work
yeah fixed it but more new errors smh
post implicitly has any type here, ts and it's typesafety TwT
i'll kms
that's refraining me from deploying it. throwing an error lol
Try chatgpt or claude to show you how to do all the type assertions.
You can change the rules as well. But best to just fix it.
post: {id: string, title:string}
yeah doing that manually rn
time consuming
That's typescript for you. But very much worth it
what even are these 😢
is prisma not compatible with pnpm?
god knows why i decided trying out pnpm for this project smh
Pnpm is good i use it for everything
what does the rest of the error message say.
It normally is not this difficult
What database are you setting up?
These issues are the same as what I am dealing with now. Regarding prisma and issue with nextjs
basically im unable to create the db
db push is just not working
error message when i tried npx prisma db push
Send me a dm with the string
Dude try prisma accelerate free plan
You are going to pull your hair out trying to configure otherwise. But you can also check those docs i sent you.
yeah thanks man