-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
using the serverless/websocket driver fails locally? #26
Comments
@Ncage1974 I have exact the same issue on the following packages. Have you found any solution?
My error says the following:
|
@feliche93 The error message you pasted doesn't look much like the same issue. Could you post this as a new GitHub issue, including a link to a minimal repo that reproduces the problem? @Ncage1974 The problem here seems to be that Node is not a very faithful imitation of the Cloudflare Workers environment. In particular, the serverless driver uses WebSockets, which aren't available in Node without a third-party package. As it also says at the link in the error message, for Node you can import The latest version of the serverless driver experimentally supports http/fetch transport for simple one-shot queries using
It's not a comprehensive fix, but does this work for you for now? If not, would you be able to post a repo that contains a minimal reproduction of the issue, so I can take a better look? |
@feliche93 i agree with @jawj it doesn't appear your issue has anything to do with mine @jawj thanks. I will give this a try & get report back here by next Monday (crazy busy weekend). If i can't get it working i will post the repo. |
@jawj thanks for your help. I tried your suggestion & it does in fact work. I appreciate it. |
I am thinking on eventually deploying my project to cloudflare workers so i'm trying to use the serverless drivers locally but when I try to connect this is the error i'm getting:
I was assuming i would want to use the
pooling
connection string but i tried to see if using thedirect
connection string would make any difference and it doesn't.I'm hoping i don't have to use different methods to connect went I deploy vs when i develop locally? As you can see in the error message i'm using Nuxt. There server is called
Nitro
which is pretty much just a node server. I looked at the link in the error message and the only suggestion was to kind of ditch websockets & use tcp\ip but like i said i prefer not to do that because i want development to be exactly the same as when its deployed in production. I'm using drizzle orm to connect & used exactly the same that is on their site:line 5
is where its failing when it tries to do theselect
statement. Any help would be appreciated.thanks....
The text was updated successfully, but these errors were encountered: