BuilderIO / BuilderIO/hydration-overlay
Events not triggered with next.js 14.1.0 ?
- Dominant language
- CSS
- Stars
- 531
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
I made sure the next.config.js did indeed load the library.
With console.logs in the _hydration-overlay-initializer.js_ I do see the script actually gets loaded, and also got assured Server-Side Html is captured.
I created a ForcedMismatch component, but the overlay didn't appear.
When I add (or change)
`window.addEventListener('error', (event) => {
console.log('Error event detected:', event.message);
});
`
in de initializer, do not see any event getting triggered.
Is next-js intercepting those events (maybe the newer versions?) before it reaches the hydration overlay script?
Or did I configure something wrong?
Contributor guide
Research direction
Start by checking next.config.js and _hydration-overlay-initializer.js to confirm how the library loads and listens for events. Reproduce the issue with the ForcedMismatch component in Next.js 14.1.0, then inspect whether the expected window error event is emitted or intercepted. Done means identifying why the hydration overlay does not appear or confirming a configuration issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100