`@neondatabase/serverless` connection string doesn't accept strings without passwords?
Couldn't find much info on this online, but I'm runnign into an odd error with
@neondatabase/serverless and trying to initiate a neon instance.
Using the snippet from the drizzle docs:
It's error out saying:
Now I know that the protocol prefix postgres:// (as opposed to postgresql:// as shown in the error example) should work, its shown that way elsewhere in the docs / the postgres ecosystem. I've tried both and it still errors. So I can only imagine that it doesnt like the fact that my user postgres doesn't have a password. Removing the user part entirely (so its just postgres://10.0.0.25:5432/drizzletest also throws the same error, not an auth error as might be expected)
Is this not a supported syntax? I'm assuming neondatabase/serverless uses some preexisting postgres conneciton string parsing and/or this is a common enough use-case so this should work π€ Or am I missing something simple maybe? π€·ββοΈ3 Replies
passive-yellowOPβ’2y ago
I'm using:
-
"@neondatabase/serverless": "^0.9.1"
- "drizzle-orm": "^0.30.9"
Yeah so adding a fake password does make that initial error disappear, ofc now the credentials are incorrect, but I can create another dummy psql user for this.
This gets rid of that error for now:
I think parsing without a password should be supported, mostly for simplicity in dev envs
Also somehow this connectionString
Gets parsed incorrectly too and throws the following error π€
I gave the host an entry in my /etc/hosts to get around this, but also maybe soemthign to look into π€fascinating-indigoβ’2y ago
What host are you connecting to?
passive-yellowOPβ’2y ago
Local dev PG container
Is that not supported?
I read its a dropin replacement for the
pg driver so I assumed it was.
Oh you knwo what, that seems to be the websocket / @neondatabase/serverless package specifically, not the -http variant. Is that right?