P
Prisma•3mo ago
Arkana

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.
No description
32 Replies
RaphaelEtim
RaphaelEtim•3mo ago
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
"file:../dev.db"
"file:../dev.db"
Arkana
Arkana•3mo ago
yes it does probably shouldn't have uploaded the .env file lol but i really need this fixed asap @RaphaelEtim
gnarley_farley.
gnarley_farley.•3mo ago
You mad bro. Remove this
Arkana
Arkana•3mo ago
No description
Arkana
Arkana•3mo ago
i think this should do!
gnarley_farley.
gnarley_farley.•3mo ago
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
Arkana
Arkana•3mo ago
i just need this to work! TwT not for production tbf
gnarley_farley.
gnarley_farley.•3mo ago
What framework are you using? nextjs?
gnarley_farley.
gnarley_farley.•3mo ago
Just came across this, might be relevant to your use case
No description
Arkana
Arkana•3mo ago
yes ohhh! alr thanks a ton man :)
gnarley_farley.
gnarley_farley.•3mo ago
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
Arkana
Arkana•3mo ago
well one needs to add this to their package.json
No description
Arkana
Arkana•3mo ago
also take care of typesafety fml yeah man true, new day new bug :3
gnarley_farley.
gnarley_farley.•3mo ago
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
Arkana
Arkana•3mo ago
i tried drizzle lmao, faced a few issues there too smh yeah i got rid of sqlite and going for postgres
Arkana
Arkana•3mo ago
any clue about this error mate?
No description
gnarley_farley.
gnarley_farley.•3mo ago
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
gnarley_farley.
gnarley_farley.•3mo ago
No description
gnarley_farley.
gnarley_farley.•3mo ago
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
Arkana
Arkana•3mo ago
yeah fixed it but more new errors smh
Arkana
Arkana•3mo ago
post implicitly has any type here, ts and it's typesafety TwT
No description
Arkana
Arkana•3mo ago
i'll kms that's refraining me from deploying it. throwing an error lol
gnarley_farley.
gnarley_farley.•3mo ago
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}
Arkana
Arkana•3mo ago
yeah doing that manually rn time consuming
gnarley_farley.
gnarley_farley.•3mo ago
That's typescript for you. But very much worth it
Arkana
Arkana•3mo ago
what even are these 😢
No description
Arkana
Arkana•3mo ago
is prisma not compatible with pnpm? god knows why i decided trying out pnpm for this project smh
gnarley_farley.
gnarley_farley.•3mo ago
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
Arkana
Arkana•3mo ago
basically im unable to create the db db push is just not working
Arkana
Arkana•3mo ago
error message when i tried npx prisma db push
No description
gnarley_farley.
gnarley_farley.•3mo ago
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.
Arkana
Arkana•3mo ago
yeah thanks man
Want results from more Discord servers?
Add your server