Git Product home page Git Product logo

Comments (21)

vientang avatar vientang commented on May 31, 2024 2

Hi,

I'm getting this error too. "Warning: react-fast-compare does not handle circular references. Error Out of stack space".

Here's a very light representation of my set up - https://codesandbox.io/s/lyjkk9lnrq

The error only shows up on IE11. Chrome, Firefox and Safari are fine. I'm using this package standalone, not with Victory, mainly b/c I was sold on the speed!

Let me know if you need any other information.

from react-fast-compare.

Scritik avatar Scritik commented on May 31, 2024 1

@chrisbolin Yeah, sorry. Forget about this, I mixed multiple things and the issue is not with react-fast-compare ;)

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

hey @natew! were you able to look into this more? definitely want to get this clear up

from react-fast-compare.

VictoriaDaug avatar VictoriaDaug commented on May 31, 2024

We're having the same issue. No circular objects, seems to working fine in dev, but throws warnings in prod.

Currently using
react: 16.5.2
webpack: 4.23.0
webpack-cli: 3.1.2
webpack-dev-server: 3.1.10

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

@VictoriaDaug thank you so much for reporting this. do you by chance have a quick reproduction? e.g. a minimal repository or a codesandbox? i don't think it's webpack related, probably just react-dev vs. react-prod

from react-fast-compare.

xaviergonz avatar xaviergonz commented on May 31, 2024

I'd use terser rather than uglify-es (which is most probably what it is using)
uglify-es is deprecated and has known minification bugs for es6 code

https://github.com/webpack-contrib/terser-webpack-plugin

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

@natew @VictoriaDaug
I haven't been able to reproduce this yet. I've tried CRA, ejected CRA, and webpack with Uglify (instead of terser). Do you have any code I could use to reproduce the issue so I can debug it?

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

(hit "Close and comment" by mistake 😛)

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

here are my attempts at reproducing the bug. so far I haven't been able to reproduce it. I would love some help!

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

@xaviergonz have you seen this issue with react-fact-compare by chance?

from react-fast-compare.

ecnaidar avatar ecnaidar commented on May 31, 2024

@chrisbolin That seems do do the trick https://github.com/ecnaidar/victory-repr

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

thank you @ecnaidar! i'll check it out when i'm back tomorrow

from react-fast-compare.

ryan-roemer avatar ryan-roemer commented on May 31, 2024

I've verified the error off of the repository. Thanks @ecnaidar

My working notes

Install

$ yarn install

Note that this installs react-fast-compare@^1.0.0

Development mode

Works fine.

$ yarn start

Navigate to: http://localhost:8090/

Production mode

Hits error:

index.js:76 Warning: react-fast-compare does not handle circular references. RangeError Maximum call stack size exceeded

$ yarn build
$ npm install -g ecstatic
$ ecstatic build --port 3000

Navigate to: http://localhost:3000/

Experiment 1 -- Upgrade RFC

I manually hacked the resolution for yarn to most recent RFC:

diff --git a/package.json b/package.json
index 65e562e..d9f6d66 100644
--- a/package.json
+++ b/package.json
@@ -16,5 +16,8 @@
   },
   "devDependencies": {
     "ecstatic": "^3.3.0"
+  },
+  "resolutions": {
+    "react-fast-compare": "2.0.4"
   }
 }

Then doing yarn install && yarn build and ecstatic build --port 3000 and going to http://localhost:3000/ yields no warnings and debugging it we're not getting that exception thrown anymore...

from react-fast-compare.

ryan-roemer avatar ryan-roemer commented on May 31, 2024

Also tried this with [email protected] and did not get the console.warn message.

If someone can get us a reproduction like @ecnaidar so wonderfully put together but with [email protected]+ that would be super useful for us digging in and figuring things out. Thanks!!!

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

@ecnaidar thank you again for the bug reproduction. The core issue is that you are using [email protected], which depends on react-fast-compare@^1.0.0, which has this RangeError bug.

Available solutions, in order of preference:

  • preferred: upgrade to [email protected] (or greater!), which upgraded react-fast-compare
  • if you are using yarn: manually add a resolutions for "react-fast-compare": "2.0.4". See Ryan's example above
  • if can can't upgrade: downgrade to [email protected] which did not contain react-fast-compare at all

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

@vientang thanks for the reproduction on CodeSandbox - that's very helpful!

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

@vientang I haven't gotten IE11 to even run CodeSandbox. i can't find official support information for it, but it fails in babel:
image
Sorry, I'm trying to do this without setting up a development environment on windows :P

from react-fast-compare.

vientang avatar vientang commented on May 31, 2024

@chrisbolin I feel ya. I'm on a mac and it's painful to start windows on my vm

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

tools like http://browserling.com are really helpful!

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

@Scritik did you leave a comment and then delete it? I'm just trying to follow up. This is the comment I got an email notification about...

@chrisbolin I have the same issue so I made a CodeSandbox to show you. I use react-redux to build some data with circular refs but the demo is using the latest version of react-fast-compare directly to compare the data. https://codesandbox.io/s/react-fast-compare-demo-8z67e

from react-fast-compare.

chrisbolin avatar chrisbolin commented on May 31, 2024

we haven't had any reports of this in a long while, so i'm going to close for now

from react-fast-compare.

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.