Coder Social home page Coder Social logo

max callstack error about docusaurus HOT 7 CLOSED

rickyvetter avatar rickyvetter commented on September 19, 2024
max callstack error

from docusaurus.

Comments (7)

rickyvetter avatar rickyvetter commented on September 19, 2024 1

Yup. To confirm, adding babel-preset-react as a direct dependency of our website prevents this bug and is the workaround we are using.

from docusaurus.

rickyvetter avatar rickyvetter commented on September 19, 2024

On further investigation, it's not just deeply nested - there are circular dependencies coming from Docusaurus. Cycle looks like:

/node_modules/wrappy/wrappy.js
/node_modules/concat-map/index.js
/node_modules/balanced-match/index.js
/node_modules/concat-map/index.js
/node_modules/balanced-match/index.js
/node_modules/fs.realpath/old.js
/node_modules/brace-expansion/index.js
/node_modules/fs.realpath/index.js
/node_modules/minimatch/minimatch.js
/node_modules/inherits/inherits.js
/node_modules/path-is-absolute/index.js
/node_modules/glob/sync.js
/node_modules/glob/common.js
/node_modules/inflight/inflight.js
/node_modules/once/once.js
/node_modules/minimatch/minimatch.js
/node_modules/path-is-absolute/index.js
/node_modules/brace-expansion/index.js

My only direct dependency is Docusaurus, 1.0.0-alpha.35.

from docusaurus.

ericnakagawa avatar ericnakagawa commented on September 19, 2024

Looks like our live server's cache invalidation logic was getting caught in a infinite loop when removing modules.

I've rewritten this function to only remove the single module plus one level of children.

For our use case we're reloading generated data.

from docusaurus.

rickyvetter avatar rickyvetter commented on September 19, 2024

Just tried patching and got a different error:

/path/to/Docusaurus/node_modules/core-js/library/fn/json/stringify.js:4
  return $JSON.stringify.apply($JSON, arguments);
                         ^

TypeError: Converting circular structure to JSON
    at Object.stringify (<anonymous>)
    at stringify (/path/to/Docusaurus/node_modules/core-js/library/fn/json/stringify.js:4:26)
    at compile (/path/to/Docusaurus/node_modules/babel-register/lib/node.js:105:42)
    at loader (/path/to/Docusaurus/node_modules/babel-register/lib/node.js:144:14)
    at Object.require.extensions.(anonymous function) [as .js] (/path/to/Docusaurus/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
error Command failed with exit code 1.

from docusaurus.

JoelMarcey avatar JoelMarcey commented on September 19, 2024

My initial guess after looking at this for a bit @ericnakagawa is the change made to babel-preset-env from babel-preset-latest/babel-preset-react.

from docusaurus.

JoelMarcey avatar JoelMarcey commented on September 19, 2024

@rickyvetter Did you keep the babel-preset-env though?

from docusaurus.

rickyvetter avatar rickyvetter commented on September 19, 2024

Yes. We still have babel-preset-env as an indirect dependency.

from docusaurus.

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.