© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•12mo ago
kāné

How to get drizzle-kit to connect to local supabase via websockets with neondatabase/serverless to

Hi,

I am working on an app that I plan to deploy to Cloudflare. I read that
neondatabase/serverless
neondatabase/serverless
is the proper driver to connect a postgres database from that environment.

I am migrating over from Prisma, and I want to introspect my current schema with
drizzle-kit pull
drizzle-kit pull
so I don't have to build it up myself.

When I run
drizzle-kit pull
drizzle-kit pull
, I keep getting this warning:
Warning  '@neondatabase/serverless' can only connect to remote Neon/Vercel Postgres/Supabase instances through a websocket
Warning  '@neondatabase/serverless' can only connect to remote Neon/Vercel Postgres/Supabase instances through a websocket
, which results in an error:

[⣷] 0 tables fetching
[⣷] 0 columns fetching
[⣷] 0 enums fetching
[⣷] 0 indexes fetching
[⣷] 0 foreign keys fetching
[⣷] 0 policies fetching
[⣷] 0 check constraints fetching
[⣷] 0 views fetching
ErrorEvent {
  [Symbol(kTarget)]: _WebSocket {
    _events: [Object: null prototype] {
      ...
    },
    _eventsCount: 4,
    _maxListeners: undefined,
    _binaryType: 'arraybuffer',
    _closeCode: 1006,
    _closeFrameReceived: false,
    _closeFrameSent: false,
    _closeMessage: <Buffer >,
    _closeTimer: null,
    _extensions: {},
    _paused: false,
    _protocol: '',
    _readyState: 3,
    _receiver: null,
    _sender: null,
    _socket: null,
    _bufferedAmount: 0,
    _isServer: false,
    _redirects: 0,
    _autoPong: true,
    _url: 'wss://127.0.0.1/v2',
    _req: null,
    [Symbol(shapeMode)]: false,
    [Symbol(kCapture)]: false
  },
  [Symbol(kType)]: 'error',
  [Symbol(kError)]: Error: connect ECONNREFUSED 127.0.0.1:443
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1634:16) {
    errno: -61,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 443
  },
  [Symbol(kMessage)]: 'connect ECONNREFUSED 127.0.0.1:443'
[⣷] 0 tables fetching
[⣷] 0 columns fetching
[⣷] 0 enums fetching
[⣷] 0 indexes fetching
[⣷] 0 foreign keys fetching
[⣷] 0 policies fetching
[⣷] 0 check constraints fetching
[⣷] 0 views fetching
ErrorEvent {
  [Symbol(kTarget)]: _WebSocket {
    _events: [Object: null prototype] {
      ...
    },
    _eventsCount: 4,
    _maxListeners: undefined,
    _binaryType: 'arraybuffer',
    _closeCode: 1006,
    _closeFrameReceived: false,
    _closeFrameSent: false,
    _closeMessage: <Buffer >,
    _closeTimer: null,
    _extensions: {},
    _paused: false,
    _protocol: '',
    _readyState: 3,
    _receiver: null,
    _sender: null,
    _socket: null,
    _bufferedAmount: 0,
    _isServer: false,
    _redirects: 0,
    _autoPong: true,
    _url: 'wss://127.0.0.1/v2',
    _req: null,
    [Symbol(shapeMode)]: false,
    [Symbol(kCapture)]: false
  },
  [Symbol(kType)]: 'error',
  [Symbol(kError)]: Error: connect ECONNREFUSED 127.0.0.1:443
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1634:16) {
    errno: -61,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 443
  },
  [Symbol(kMessage)]: 'connect ECONNREFUSED 127.0.0.1:443'


Reading the
drizzle.config.ts
drizzle.config.ts
documentation, I can't seem to find where or how to set the driver. The section on
driver
driver
only provides three options, but I don't see anything specific to neon.

https://orm.drizzle.team/docs/drizzle-config-file#driver
Drizzle ORM - drizzle.config.ts
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Drizzle-kit incorrectly defaulting to @neondatabase/serverless driver
Drizzle TeamDTDrizzle Team / help
10mo ago
Drizzle-kit won't connect to local neon database
Drizzle TeamDTDrizzle Team / help
15mo ago
'@neondatabase/serverless' can only connect to remote Neon/Vercel Postgres/Supabase instances
Drizzle TeamDTDrizzle Team / help
2y ago
how to use http instead of ws for drizzle-kit commands for @neondatabase/serverless in 0.21.0
Drizzle TeamDTDrizzle Team / help
2y ago