You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2 - Create a client component which will call and use this lib :
'use client';importinitfrom"@elastic/apm-rum";exportfunctionInitApm(){consta=init;// just importing this function and calling it cause the error (commenting this line fix the behaviour)returnnull;}
3 - Call this client component into your layout.tsx
4 - Navigate on your next app
5 - You will see that the SPA behaviour is now broken :
Describe the Bug
When @elastic/apm-rum is imported in a client component, the SPA behaviour no longer works, and navigation clicks fully reload the pages.
Expected Behavior
Next links should not reload the full page at each navigation click and works as an SPA even if @elastic/apm-rum is used.
This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.
This issue has been automatically closed due to two years of inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding!
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
https://github.com/pierrechevaliercf/NextSPAError
To Reproduce
Tested with next 13.4.6
1 - Install @elastic/apm-rum
npm i @elastic/apm-rum
(5.12.0)2 - Create a client component which will call and use this lib :
3 - Call this client component into your layout.tsx
4 - Navigate on your next app
5 - You will see that the SPA behaviour is now broken :
Describe the Bug
When @elastic/apm-rum is imported in a client component, the SPA behaviour no longer works, and navigation clicks fully reload the pages.
Expected Behavior
Next links should not reload the full page at each navigation click and works as an SPA even if @elastic/apm-rum is used.
Which browser are you using? (if relevant)
Chrome (114.0.5735.134) & Firefox (114.0.2 (64 bits))
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: