Link to the code that reproduces this issue
https://github.com/Quicksilver0218/next.js-dev-router-issue
To Reproduce
- Start the application in development (next dev).
- Open a new tab on a browser.
- Go to http://localhost:3000 on the new tab on the browser.
- Click the 'Test' button at the bottom. The message 'Test' will be prompted.
- Navigate back on the browser (click the back button).
- Navigate forward on the browser (click the forward button).
- Click the 'Test' button at the bottom again. Nothing happened.
Current vs. Expected behavior
Expected Behaviour
The home page should be successfully loaded again. JavaScript should work and the message 'Test' will be prompted when the 'Test' button is clicked. The messages on the Dev Indicator should look like this.
Current Behaviour
JavaScript does not work. Nothing happened when the 'Test' button is clicked. The messages on the Dev Indicator look like this.
Provide environment information
Operating System:
Platform: Windows 10
Arch: x86-64
Version: Windows 10 Version 1809
Binaries:
Node: 24.14.1
npm: 11.11.0
Relevant Packages:
next: 16.2.2
eslint-config-next: 16.2.2
react: 19.2.4
react-dom: 19.2.4
typescript: 5.9.3
Which area(s) are affected? (Select all that apply)
Linking and Navigating
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
Can be reproduced in Next.js 16.2.0
Cannot be reproduced in Next.js 16.1.7
Link to the code that reproduces this issue
https://github.com/Quicksilver0218/next.js-dev-router-issue
To Reproduce
Current vs. Expected behavior
Expected Behaviour
The home page should be successfully loaded again. JavaScript should work and the message 'Test' will be prompted when the 'Test' button is clicked. The messages on the Dev Indicator should look like this.
Current Behaviour
JavaScript does not work. Nothing happened when the 'Test' button is clicked. The messages on the Dev Indicator look like this.
Provide environment information
Which area(s) are affected? (Select all that apply)
Linking and Navigating
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
Can be reproduced in Next.js 16.2.0
Cannot be reproduced in Next.js 16.1.7