Git Product home page Git Product logo

Comments (9)

marcelklehr avatar marcelklehr commented on September 23, 2024

Hey :)

Are you reporting this to this repo because of the "circular structure" JSON.stringify error? If not, then this looks like a normal error due to wrong use of toposort. Toposort throws an error if you try to sort circular data.

from toposort.

darkylmnx avatar darkylmnx commented on September 23, 2024

@marcelklehr yes i'm talking about the ""circular structure" JSON.stringify error". I'm not the one using toposort here, it seems to be a dep of webpack 4 and when the dep is >= 1.0.7 I have this error, when I force toposort to 1.0.6 or under it works

from toposort.

darkylmnx avatar darkylmnx commented on September 23, 2024
toposort@^1.0.0:
  version "1.0.6"
  resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.6.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec"

this works without an error, but any time I upgrade something I get this lock with the error mentioned in the console

toposort@^1.0.0:
  version "1.0.7"
  resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#c31748e55d210effc00fdcdc7d6e68d7d7bb9cec"

from toposort.

marcelklehr avatar marcelklehr commented on September 23, 2024

when I force toposort to 1.0.6 or under it works

oh. Interesting!

from toposort.

marcelklehr avatar marcelklehr commented on September 23, 2024

However, the exact error you describe cannot happen with v1.0.7 anymore, because line 21 has been changed v1.0.4...v1.0.7

This diff also shows the difference between version 1.0.4 and v1.0.7 which is one test and said change around line 21. I highly doubt that there's an input that throws an error in v1.0.7 but doesn't in v1.0.4, but if you like you can create a gist or a repo that I can use to reproduce and debug.

from toposort.

darkylmnx avatar darkylmnx commented on September 23, 2024

from toposort.

alkurbatov avatar alkurbatov commented on September 23, 2024

Good morning, everybody.
I've got the same issue with toposort recently. While the real problem was in my Vue code (circular dependency in one of the components) toposort failed with "circular structure" in JSON.stringify.
It is turned out that when toposort investigates the circular dependency error it tries to throw out a Error and notify about it, however, it also tries to use JSON.stringify on the incoming json structure.
In my case the json structure was circular too so toposort failed to throw Error and hid the original reason.

This happened on 1.0.4 and 1.0.6.

Hope this helps.

from toposort.

marcelklehr avatar marcelklehr commented on September 23, 2024

from toposort.

alkurbatov avatar alkurbatov commented on September 23, 2024

Hey @marcelklehr ,
thank you for the suggestion, the error processing code is much better now. I will update the dependency :)

from toposort.

Related Issues (16)

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.