DEV Community

loading...

Discussion on: Integrating MapBox with Next.js — the Cheaper Alternative to Google Maps

Collapse
samthomson profile image
Sam Thomson

I get the error 'ReferenceError: dynamic is not defined'
This was after I changed the required package from react-mapbox-gl to react-map-gl (since that is what you import from).

Collapse
professor833 profile image
Lalit Vavdara

'ReferenceError: dynamic is not defined' is because u need to import dynamic from

"next/dynamic"

Collapse
samthomson profile image
Sam Thomson

Thanks. In the end I removed react-mapbox-gl which I found restrictive and just used mapbox-gl itself. No issues so far and easy to make use of everything mapbox offers.

Thread Thread
professor833 profile image
Lalit Vavdara

Good to know that, buddy 👍👍