TypeError: Object(...) is not a function
./node_modules/react-leaflet/es/context.js node_modules/react-leaflet/es/context.js:8
// $FlowFixMe: import
forwardRef } from 'react';
var _createContext = createContext({}), // This line fails
Consumer = _createContext.Consumer,
Provider = _createContext.Provider;
Just ran into this, you need to upgrade to React 16.3 or above as react-leaflet is using the context API.
npm i -S react react-dom
That should do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With