Hey everyone,
I ran into the following error after installing react-leaflet and attempting to run an example:
Module not found: Can’t resolve ‘leaflet’ in ‘…\node_modules\react-leaflet\es’
It turned out I’d simply rushed things and skipped the second step in the documentation:
npm install leaflet react react-dom # npm
yarn add leaflet react react-dom # Yarn
yarn add leaflet react react-dom # Yarn
Doco: https://react-leaflet.js.org/docs/en/installation.html
Leave a Reply