Skip to content

[BUG] Prod-only crash when enabling cacheComponents (Uncaught SyntaxError: Unexpected identifier '$') #1130

@thipperz

Description

@thipperz

Describe the bug

I get this error (production only) when trying to iterate over a "results" object and rendering stuff in async component.

At first I thought it was a Next.js issue but I could not reproduce this error when deploying on Vercel.

It occurs only when enabling cacheComponents

Steps to reproduce

  1. Clone the repo ppr-repro
  2. Deploy to Cloudflare Workers
  3. Try to load the homepage.
  4. If it works, try reloading it.

Expected behavior

Page should render the suspense component after the delay without crashing.

@opennextjs/cloudflare version

1.16.5

Wrangler version

4.65.0

next info output

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 11961
  Available CPU cores: 16
Binaries:
  Node: 24.2.0
  npm: 11.3.0
  Yarn: 1.22.21
  pnpm: 10.28.1
Relevant Packages:
  next: 16.2.0-canary.46 // Latest available version is detected (16.2.0-canary.46).
  eslint-config-next: N/A
  react: 19.2.3
  react-dom: 19.2.3
  typescript: 5.9.3
Next.js Config:
  output: N/A

Additional context

Image

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