When I try to use kysely-codegen
to connect to my postgres RDS instance in AWS Aurora and I set the DATABASE_URL
to the connection string generated via this documented method, kysely-codegen --dialect postgres
gives me the following error:
• Loaded environment variables from .env file.
• Using dialect 'postgres'.
node:internal/url:797
this.#updateContext(bindingUrl.parse(input, base));
TypeError: Invalid URL
at new URL (node:internal/url:797:36)
at parse (/Users/mperrone/code/project/repo/node_modules/pg-connection-string/index.js:29:14)
at new ConnectionParameters (/Users/mperrone/code/project/repo/node_modules/pg/lib/connection-parameters.js:56:42)
at new Client (/Users/mperrone/code/project/repo/node_modules/pg/lib/client.js:18:33)
at BoundPool.newClient (/Users/mperrone/code/project/repo/node_modules/pg-pool/index.js:218:20)
at BoundPool.connect (/Users/mperrone/code/project/repo/node_modules/pg-pool/index.js:212:10)
at PostgresDriver.acquireConnection (/Users/mperrone/code/project/repo/node_modules/kysely/dist/cjs/dialect/postgres/postgres-driver.js:21:41)
at RuntimeDriver.acquireConnection (/Users/mperrone/code/project/repo/node_modules/kysely/dist/cjs/driver/runtime-driver.js:31:47)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DefaultConnectionProvider.provideConnection (/Users/mperrone/code/project/repo/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:10:28) {
code: 'ERR_INVALID_URL',
input: '<redacted>',
base: 'postgres://base'
}
Is this type of connection string supported?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too