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