Skip to content

[🐛 Bug]: Next.js Link component not working #469

Closed
@dhmacs

Description

@dhmacs

next-on-pages environment related information

System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
CPU: (10) arm64 Apple M1 Max
Memory: 32 GB
Shell: /bin/zsh
Binaries:
Node: 16.14.2
Bun: N/A
pnpm: 8.5.1
Yarn: 1.22.15
npm: 8.5.0
Package Manager Used: npm
Relevant Packages:
@cloudflare/next-on-pages: 1.6.1
vercel: 32.3.1
next: 13.5.2

Description

Next.js Link component do not trigger client side navigation and always result in a page reload.
On top of that, the default prefetch behaviour results in 404 errors in the console

Screenshot 2023-09-24 at 16 15 31

Reproduction

Create a new project with:

npm create cloudflare@latest my-next-app -- --framework=next

Add a second dummy page, and link to it from the home page. Deploy to Cloudflare pages and use the production url to see the issue described above

Pages Deployment Method

Direct Upload (wrangler pages publish or the @cloudflare/pages-action GitHub Action)

Pages Deployment ID

69ea45f8

Additional Information

Here's the link from my test project: https://69ea45f8.test-link.pages.dev

Would you like to help?

  • Would you like to help fixing this bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions