Deploying a solution with pg gives error: Could not resolve "pg-native" #228
-
Im using pg in a few endpoints. I get this error when I deploy a sveltekit app to vercel. Error taken from log. Am I supposed to do any further configuration? |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 6 replies
-
I would recommend using Postgres through an API, to prevent having to open a connection to the database on every request. A great example of this would be Supabase. More details: https://twitter.com/leeerob/status/1430177168307412998 (Mentioning this because you wouldn't need |
Beta Was this translation helpful? Give feedback.
-
Thank you. So my original question about pg-native error - is that vercel related? Regarding my dreaming, could you help me out understanding why it's not so brilliant? |
Beta Was this translation helpful? Give feedback.
-
Thanks @leerob As soon as I see webpack I turn around :-) as earlier I've never felt confident enough to do anything other than copy and paste webpack stuff. Btw it's actually a sveltekit solution (tried both the auto and vercel adapter). Im sure it's not vercel but since I chose vercel to make this deploy easy I've pivoted to deploying to a dokku container. This actually deployed without any problems (with adapter-node) - making it simple for me again. So maybe that's best for these kind of solutions I guess. |
Beta Was this translation helpful? Give feedback.
Thanks @leerob
As soon as I see webpack I turn around :-) as earlier I've never felt confident enough to do anything other than copy and paste webpack stuff.
Btw it's actually a sveltekit solution (tried both the auto and vercel adapter).
Im sure it's not vercel but since I chose vercel to make this deploy easy I've pivoted to deploying to a dokku container. This actually deployed without any problems (with adapter-node) - making it simple for me again. So maybe that's best for these kind of solutions I guess.