Next.js 15 (App Router) - React-Leaflet Popups Not Showing in Production
Unanswered
ddev posted this in #help-forum
ddevOP
Hi everyone,
I'm having an issue with react-leaflet popups not displaying in my Next.js 15 application (using App Router) when built for production. Everything works perfectly in development (next dev) – markers appear, and popups show on click. However, after building (next build) and starting (next start) for production, markers are visible, but popups icon simply do not appear.
What I've tried so far (without success):
CSS Loading: Ensured leaflet.css is imported globally (e.g., in layout.js).
Client Component: My map component uses "use client".
It seems the Popup component either isn't rendering its HTML or isn't inserting it into the DOM in the production build.
Any insights or suggestions would be greatly appreciated!
Thanks!
I'm having an issue with react-leaflet popups not displaying in my Next.js 15 application (using App Router) when built for production. Everything works perfectly in development (next dev) – markers appear, and popups show on click. However, after building (next build) and starting (next start) for production, markers are visible, but popups icon simply do not appear.
What I've tried so far (without success):
CSS Loading: Ensured leaflet.css is imported globally (e.g., in layout.js).
Client Component: My map component uses "use client".
It seems the Popup component either isn't rendering its HTML or isn't inserting it into the DOM in the production build.
Any insights or suggestions would be greatly appreciated!
Thanks!
2 Replies
Dutch
We can debug it together, tell me when you have some time @ddev
can you provide a min repro repo