Skip to content

[BUG] Cannot build with Hyperdrive #900

@Antoine4011

Description

@Antoine4011

Describe the bug

Hello, I cannot deploy my app with the hyperdrive binding.

When calling opennextjs-cloudflare build, it shows :

"UserError: When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the 'WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_NEON' variable or "NEON"'s "localConnectionString" to the Postgres connection string."

  • It's working with pnpm dev (and I understand why I need to have WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_NEON setup locally)
  • But it's not working when trying to deploy this to our worker. It's unclear to me why I would need to have a local postgres to deploy.

Thanks for your help !

Steps to reproduce

  1. Add hyperdrive setup to wrangler
        {
          "binding": "NEON",
          "id": "hyperdrive-preview",
        }
  1. Build with opennextjs-cloudflare build

Edit: issues seems to be on building, I haven't test the deploy yet

Expected behavior

It should work out of the box

@opennextjs/cloudflare version

1.8.2

Wrangler version

4.38.0

next info output

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.0.0: Mon Aug 25 21:17:51 PDT 2025; root:xnu-12377.1.9~3/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 22.16.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.16.1
Relevant Packages:
  next: 15.5.2 // There is a newer version (15.5.3) available, upgrade recommended! 
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.9.2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions