DT
Drizzle Team•11mo ago
Exefer

LibsqlError: URL_INVALID: The URL is not in a valid format

Out of nowhere I started getting this error, whats even weiirder is that it only occurs on one route. /posts/create
9 Replies
Exefer
ExeferOP•11mo ago
since it only happens on this route, I really cant debug it because i import the db lib file in the same way in all routes and yet only this one errors This error is nonsense, why should it be thrown only on that route? Should i provide the repo?
Exefer
ExeferOP•11mo ago
GitHub
GitHub - Aryxst/onlyprogrammers
Contribute to Aryxst/onlyprogrammers development by creating an account on GitHub.
Exefer
ExeferOP•11mo ago
GitHub
onlyprogrammers/src/app/(logged)/posts/_new at master · Aryxst/only...
Contribute to Aryxst/onlyprogrammers development by creating an account on GitHub.
Mykhailo
Mykhailo•11mo ago
Hey @Aryxst I see that in other routes you use use server but it is missing in posts/create route, so this might cause the issue. Also, try to console.log your env variable in this route
Exefer
ExeferOP•11mo ago
💀 If thats the issue i will cry I will try it out tomorrow thank you! nope didnt work
Mykhailo
Mykhailo•11mo ago
could you console.log your db url in your route please?
Exefer
ExeferOP•11mo ago
undefined
Mykhailo
Mykhailo•11mo ago
so there is a problem with env variables in your route, not drizzle related
Exefer
ExeferOP•11mo ago
why does it work on all other routes

Did you find this page helpful?