Giter Site home page Giter Site logo

Upgrading to latest version 5.0.3 throws compiling error: Can't reexport the named export 'Comment' from non EcmaScript module (only default export is available) about html-react-parser HOT 8 OPEN

giovannirosa avatar giovannirosa commented on May 27, 2024 5
Upgrading to latest version 5.0.3 throws compiling error: Can't reexport the named export 'Comment' from non EcmaScript module (only default export is available)

from html-react-parser.

Comments (8)

1978milanbabic avatar 1978milanbabic commented on May 27, 2024 1

Thanks @1978milanbabic. Do you have a reproducible example so I can verify the bug?

Sorry, I work on a huge project and this was a MUST, ;) Luckily, found this solution..

from html-react-parser.

remarkablemark avatar remarkablemark commented on May 27, 2024

Thanks for opening this issue @giovannirosa! Can you provide a reproducible example?

from html-react-parser.

1978milanbabic avatar 1978milanbabic commented on May 27, 2024

Same issue.
React 18
OS Win 11

from html-react-parser.

1978milanbabic avatar 1978milanbabic commented on May 27, 2024

This is a webpack issue for 'older' packages

Here is the solution that worked for me:
1.
npm i --save react-app-rewired
2.
In package.json "scripts" wherever you have 'react-scripts' -> replace with 'react-app-rewired'
like this:

"start": "react-app-rewired  start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-app-rewired eject",

create 'config-overrides.js' file in root folder
4.
save config file with this content:

module.exports = function override(webpackConfig) {
  webpackConfig.module.rules.push({
    test: /\.mjs$/,
    include: /node_modules/,
    type: 'javascript/auto'
  });

  return webpackConfig;
};

from html-react-parser.

remarkablemark avatar remarkablemark commented on May 27, 2024

Thanks @1978milanbabic. Do you have a reproducible example so I can verify the bug?

from html-react-parser.

olupelumi avatar olupelumi commented on May 27, 2024

Hi I'm having the same issue. How would I give you a reproducible example?
I'm on React 16.8.6.

from html-react-parser.

remarkablemark avatar remarkablemark commented on May 27, 2024

@olupelumi can you create a CodeSandbox? See JavaScript or TypeScript

from html-react-parser.

6gal6ler6 avatar 6gal6ler6 commented on May 27, 2024

Got the same Error with the version 5.0.7

React 17.0.1
OS Win 11
Project: SharePoint Framework 1.18.2

from html-react-parser.

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.