opennextjs / opennextjs-cloudflare

Open Next.js adapter for Cloudflare
https://opennext.js.org/cloudflare
MIT License
354 stars 7 forks source link

Error: The script will never generate a response #131

Closed D-rone closed 5 hours ago

D-rone commented 5 hours ago

Describe the bug

I tried using this library over and over, debugging and building works, but when running the code i get "Error: The script will never generate a response."

And when building and previewing i'm getting this error:

▲ [WARNING] Using direct eval with a bundler is not recommended and may cause problems [direct-eval]

.worker-next/index.mjs:9093:38: 9093 │ ... var stats = eval("require")(eval("require").resolve(path.joi...

You can read more about direct eval and bundling here: https://esbuild.github.io/link/direct-eval

Steps to reproduce

Creating simple next.js app, and appliying steps

  1. Run "npm run dev:worker" to get the first error
  2. Run "npm run preview" to get the second error

Expected behavior

Expected to get a page response

@opennextjs/cloudflare version

0.2.1

Node.js version

20.17.0

Wrangler version

3

next info output

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 7960
  Available CPU cores: 4
Binaries:
  Node: 20.17.0
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: 9.4.0
Relevant Packages:
  next: 15.0.3 // Latest available version is detected (15.0.3).
  eslint-config-next: 14.2.14
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.6.3
Next.js Config:
  output: N/A

Additional context

No response

vicb commented 5 hours ago

We haven't really tested N15. I'm closing this issue for now - as we will test when support is added (~weeks).

D-rone commented 4 hours ago

I got the same issue with next 14