Comments (21)
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.
@chrisbolin Yeah, sorry. Forget about this, I mixed multiple things and the issue is not with react-fast-compare
;)
from react-fast-compare.
hey @natew! were you able to look into this more? definitely want to get this clear up
from react-fast-compare.
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.
@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.
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.
@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.
(hit "Close and comment" by mistake 😛)
from react-fast-compare.
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.
@xaviergonz have you seen this issue with react-fact-compare by chance?
from react-fast-compare.
@chrisbolin That seems do do the trick https://github.com/ecnaidar/victory-repr
from react-fast-compare.
thank you @ecnaidar! i'll check it out when i'm back tomorrow
from react-fast-compare.
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.
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.
@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 upgradedreact-fast-compare
- if you are using
yarn
: manually add aresolutions
for"react-fast-compare": "2.0.4"
. See Ryan's example above - if can can't upgrade: downgrade to
[email protected]
which did not containreact-fast-compare
at all
from react-fast-compare.
@vientang thanks for the reproduction on CodeSandbox - that's very helpful!
from react-fast-compare.
@vientang I haven't gotten IE11 to even run CodeSandbox. i can't find official support information for it, but it fails in babel:
Sorry, I'm trying to do this without setting up a development environment on windows :P
from react-fast-compare.
@chrisbolin I feel ya. I'm on a mac and it's painful to start windows on my vm
from react-fast-compare.
tools like http://browserling.com are really helpful!
from react-fast-compare.
@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.
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)
- Upgrade dependencies
- Add ability to compare functions HOT 9
- module '/node_modules/react-fast-compare/index.js' does not provide an export HOT 1
- Handle anonymous function HOT 2
- Bug: Set compares by reference not value HOT 6
- TypeScript library for react-fast-compare? HOT 9
- Fix exported types so that they work for react-redux HOT 8
- Cannot compare object will null prototype HOT 11
- Getters are not considered HOT 2
- IE 11: Object doesn't support property or method 'isView' HOT 26
- There should be a 'debug' feature to determine which fields are breaking equality.
- Types: documentation, clean up, and testing
- Audit security alerts HOT 2
- Fix benchmark chart img path
- Ignore Arrow Functions HOT 1
- Re-evaluate project's eslint rules HOT 1
- Update benchmark png HOT 2
- CJS + ESM Question/discussion HOT 6
- Differences in objects with properties that are associative arrays are not detected HOT 8
- Infra: Switch to GitHub Actions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-fast-compare.