Error connecting from Vercel with Typeorm

I tried to connect our staging environment with Neon, but got the next error:

“2022-09-07T03:40:21.908Z 8ce49306-fe9d-4ac9-9808-f11ba5515f8f ERROR error: connection is insecure (try using sslmode=require)
at Parser.parseErrorMessage (/var/task/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (/var/task/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/var/task/node_modules/pg-protocol/dist/parser.js:39:38)
at Socket. (/var/task/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (events.js:400:28)
at Socket.emit (domain.js:475:12)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)
at Socket.Readable.push (internal/streams/readable.js:206:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
length: 74,
severity: ‘ERROR’,
code: ‘CXX000’,
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: undefined,
line: undefined,
routine: undefined,
page: ‘/’
}
RequestId: 8ce49306-fe9d-4ac9-9808-f11ba5515f8f Error: Runtime exited with error: exit status 1
Runtime.ExitError”

Already added “ssl:true” to the ormconfig, and tried to append sslmode=require to the url, but no luck, any ideas?

Hi!

Right, we only support encrypted connections. However, even with ssl=true with some client drivers you can face ERROR: The project ID is not specified error. Explanation and several workarounds are listed here: Connecting with old clients — Neon Docs

Meanwhile, we are working on patching client drivers.