'@neondatabase/serverless' can only connect to remote Neon/Vercel Postgres/Supabase instances
how to suppress this warning or remove this error?
6 Replies
Have you found solution? I’m having the same warning when using the drizzle kit.
Hey guys. If you use neon driver with non-neon database you should use pool connection and
drizzle-orm/neon-serverless
like here:
@Mykhailo thanks but what do you mean by non-neon database? do you mean drizzle?
The connection is still working using the neon-http setup. Do you know the danger the websocket warning is trying to prevent? Although this is in local dev, I haven't pushed to production yet.
Sorry, I understood that it is with Drizzle kit. There is no any danger, it just says that in this case websocket should be used
@Deragon @Mykhailo Okay. I have figured out something.
Drizzle-kit will use the pg driver, so only have to install it as a dev dependency. Otherwise, it will want to use the neon serverless driver which will result to the error warning.
We can still use the neon-http setup to query the database instead of the websocket.