Git Product home page Git Product logo

Comments (7)

RomikimoR avatar RomikimoR commented on August 17, 2024

Hello, My error is slightly different but means the same:

node_modules/json-diff-kit/dist/index.js: Missing class properties transform.
  715 | // src/differ.ts
  716 | var Differ = class {
> 717 |   options;
      |   ^
  718 |   arrayDiffFunc;
  719 |   constructor({
  720 |     detectCircular: detectCircular2 = true,

I also added the package with npm install --save-dev @babel/plugin-proposal-class-properties and try to configure either my webpack config or even create a .babelrc file but nothing work.

Any idea ?
Thanks

from json-diff-kit.

RexSkz avatar RexSkz commented on August 17, 2024

This may be due to the compiled result by ESBuild. I'll investigate it later.

from json-diff-kit.

RexSkz avatar RexSkz commented on August 17, 2024

I didn't find the error in my example app created by the create-react-app.

https://github.com/RexSkz/test-babel-class-properties

Could you please provide more details, such as the .babelrc file, or a minimal example?

from json-diff-kit.

ipramono avatar ipramono commented on August 17, 2024

Found the same issue. `import { Differ, Viewer } from "json-diff-kit";
import "json-diff-kit/dist/viewer.css";

const differ = new Differ({
detectCircular: true, // default true
maxDepth: Infinity, // default Infinity
showModifications: true, // default true
arrayDiffMethod: "lcs", // default "normal", but "lcs" may be more useful
});
const diff = differ.diff(changeRequest.before, changeRequest.after);

    return (
      <Viewer
        diff={diff} // required
        indent={4} // default `2`
        lineNumbers={false} // default `false`
        highlightInlineDiff={true} // default `false`
        inlineDiffOptions={{
          mode: "word", // default `"char"`, but `"word"` may be more useful
          wordSeparator: " ", // default `""`, but `" "` is more useful for sentences
        }}
      />
    );`

from json-diff-kit.

RexSkz avatar RexSkz commented on August 17, 2024

@ipramono Can you provide your babel version and the babelrc file?

from json-diff-kit.

ipramono avatar ipramono commented on August 17, 2024

@RexSkz I don't have babelrc, and there's no babel in my package.json

from json-diff-kit.

number-00 avatar number-00 commented on August 17, 2024

I was also getting this error and it got resolved after I changed

"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-scripts": "3.4.1",
to

"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4",

in my package.json file

from json-diff-kit.

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.