Giter Site home page Giter Site logo

Comments (8)

HaruMiyaGi avatar HaruMiyaGi commented on May 27, 2024 1

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.

Josh-Cena avatar Josh-Cena commented on May 27, 2024

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.

razzeee avatar razzeee commented on May 27, 2024

I would be happy to wait, unless you want me to test something that way

from react-svg-worldmap.

Josh-Cena avatar Josh-Cena commented on May 27, 2024

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.

jahirfiquitiva avatar jahirfiquitiva commented on May 27, 2024

@Josh-Cena @yanivam

How can I import the data in countries.geo.ts with the latest alpha? I am getting this error in a NextJS app

Shot 2022-06-14 at 15 09 19@2x

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.

yanivam avatar yanivam commented on May 27, 2024

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.

Josh-Cena avatar Josh-Cena commented on May 27, 2024

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.

razzeee avatar razzeee commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.