NeonN
Neon2y ago
17 replies
living-lavender

Knex with Neon Serverless Driver

I am using Knex.js as my query builder. I want to use it alongside Neon's serverless driver. I'm using this repo as an example (https://github.com/neondatabase/neon-vercel-knex/tree/main)

However it is not working, I am getting the following error. Would really appreciate some help with
I'm on "knex": "^3.1.0" and "neonctl": "^1.29.3"

Could not find a declaration file for module 'knex/lib/dialects/postgres'. '/Users/xxxxx/Desktop/projects/goldengate/node_modules/knex/lib/dialects/postgres/index.js' implicitly has an 'any' type.
If the 'knex' package actually exposes this module, try adding a new declaration (.d.ts) file containing declare module 'knex/lib/dialects/postgres';ts(7016)
GitHub
Example use of Neon serverless driver on Vercel Edge Functions with Knex.js - neondatabase/neon-vercel-knex
GitHub - neondatabase/neon-vercel-knex: Example use of Neon serverl...
Was this page helpful?