issues using leaflet with nextjs
Unanswered
Japanese jack mackerel posted this in #help-forum
Japanese jack mackerelOP
Im trying to use leaflet within nextjs, initially i was getting this error when loading the page: " TypeError: (0 , reactWEBPACK_IMPORTED_MODULE_0.createContext) is not a function"
i did find an online resource that suggested to use the "use client"; at the top of my page and while that worked it also gave me a new error that ⨯ node_modules\leaflet\dist\leaflet-src.js (230:18) @ window
⨯ ReferenceError: window is not defined
does anyone know what this error means, or know of an up to date guide for using leaflet/react-leaflet within nextjs?
i did find an online resource that suggested to use the "use client"; at the top of my page and while that worked it also gave me a new error that ⨯ node_modules\leaflet\dist\leaflet-src.js (230:18) @ window
⨯ ReferenceError: window is not defined
does anyone know what this error means, or know of an up to date guide for using leaflet/react-leaflet within nextjs?