Error importing with Vite
If using vite, import cannot be possible.
Failed to resolve entry for package "react-mapkit". The package may have incorrect main/module/exports specified in its package.json.
Plugin: vite:import-analysis
@cesargdm I've been having the same problem when importing with yarn. Think I've found a temporary fix:
Go to /node_modules/react-mapkit/package.json. Change line 23 to "module": "dist/react-mapkit.cjs.production.min.js",. This seemed to fix it for me, and now the import works and I can get the map to display.
No issues with Vite here! Here's my repo if that helps: https://github.com/bnussman/beep/tree/main/website
Having the same issue with Vite v4.4.9.
Failed to resolve entry for package "react-mapkit". The package may have incorrect main/module/exports specified in its package.json.
Plugin: vite:import-analysis
I'm not familiar with vite, so I'm not sure whats up. Did anyone check out @bnussman's repo?
Vite is a replacement for the dead/dying create-react-app. It's gaining lots of popularity.
I looked at @bnussman's repo. Looks like they are using a different package (mapkit-react vs react-mapkit)
https://github.com/bnussman/beep/blob/39849cb8fe6e8912d9b11ded1bcdb87707cfe758/website/package.json#L25
I've made a very simple project using Vite and react-mapkit to demonstrate the issue. Clone and run (instructions in the README) and you'll see the crash.
https://github.com/doubleforte/mapkit-example
OMG!! I'm so sorry
I hope to look at this soon, but until my kids are back at school my free time has been less than ideal :)
Any progress on this one?