Comments (8)
The new version also seems to break for me, I'm getting: SyntaxError: Cannot use import statement outside a module
, UnhandledPromiseRejection
errors.
A quick fix is changing "react-svg-worldmap": "^2.0.0-alpha.0"
to "react-svg-worldmap": "2.0.0-alpha.0"
in your package.json
if you didn't plan on upgrading versions yet.
from react-svg-worldmap.
Indeed, it's because we don't compile our source to CJS now. While I'll work to fix this, if you exclude node_modules from compilation, can you try excluding this package from that exclude pattern?
from react-svg-worldmap.
I would be happy to wait, unless you want me to test something that way
from react-svg-worldmap.
Do note that you are encouraged to pin your dependencies for any alpha software. Alphas are meant to "break" between minor versions. Migration to ESM is almost always going to break someone's code, but for us, a client-side library, the impact should be much lower.
@HaruMiyaGi Are you also using Next.js and their default Webpack config? This repo has a Docusaurus site set up and it runs just as usual.
from react-svg-worldmap.
How can I import the data in countries.geo.ts
with the latest alpha? I am getting this error in a NextJS app
My code is:
import countries from 'react-svg-worldmap/dist/countries.geo';
const data: Data = countries.features.map((country) => {
return { country: country.I, value: 0 };
});
from react-svg-worldmap.
I will investigate this and get back to you within the next week if my workload lightens. Sorry about the delay in this, it has been a busy time for me and I am just getting back into it.
Yams
from react-svg-worldmap.
Hey there, I took a shot in the dark and I hope cce009c will fix it. Once @yanivam gets to publish another alpha, please kindly let me know if it works. Will be happy to reopen after that if it still doesn't. Thanks!
from react-svg-worldmap.
Doesn't seem to help, unless there is something else we would need to change flathub/website#550
from react-svg-worldmap.
Related Issues (20)
- [BUG] useLayoutEffect does nothing on the server HOT 1
- [BUG] no country color when all countries have the same value HOT 4
- [BUG] double click to zoom trigger the onclick event HOT 5
- [ENHANCEMENT] Export country list using ESM import HOT 3
- Kindly add all remaining countries to countries.geo.js HOT 6
- Map projection - Kamchatka Peninsula is cut out HOT 4
- How to inject HTML in tooltip HOT 4
- [BUG] Statistics map labels do not fit in boxes for RTL languages HOT 4
- Color Prop not working as expected with false-y values HOT 4
- [ENHANCEMENT] Convert your data into react-svg-worldmap supported JSON HOT 2
- [BUG] Strange tooltip behavior via using onClickFunction and tooltipTextFunction HOT 1
- [BUG] HOT 6
- [BUG] Can't use worldmap on yarn + vite + react HOT 5
- [BUG] problem with build next js app HOT 9
- [BUG] Cannot read properties of undefined (reading 'forwardRef') HOT 7
- [BUG] Ukraine does not include Crimea HOT 6
- [BUG] Failed to parse source map
- [BUG] Responsive size calculation is buggy HOT 1
- Hong Kong and Singapore are unreachable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-svg-worldmap.