-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: Maximum call stack size exceeded when using json/nested #464
Comments
@lukasoppermann
@dbanksdesign if there is a circular reference issue possibility here, it might be worth for us to catch the "RangeError: Maximum call stack size exceeded" error and output a line telling people they have a circular reference as an error / failure.... if we can even catch that. |
I think I have found what causes it, in the json below the "body": {
"h3": {
"comment": "Comment for text style",
"fontSize": {
"value": 20,
"type": "number",
"unit": "pixel"
},
"textDecoration": {
"value": "none",
"type": "string"
}, //… |
Found the issue and opened a PR for it: #465 |
@dbanksdesign while it looks like we have a solution for the issue now, it still stands that there may be another data state in which an infinite loop could occur here. Do we want to try to catch that? |
Good call. I'll try to think of other cases that would result in an infinite loop... |
This is now merged and released in v2.10.2! |
Thank you! |
Hey, I am getting the following error when trying to transform my json file. I am a bit at a loss what to do about it. 😅
Please let me know how I can provide some more helpful information.
RangeError: Maximum call stack size exceeded
at String.hasOwnProperty ()
at minifyDictionary (/Users/lukasoppermann/Repos/design-token-transformer/node_modules/style-dictionary/lib/common/formats.js:75:11)
at minifyDictionary (/Users/lukasoppermann/Repos/design-token-transformer/node_modules/style-dictionary/lib/common/formats.js:80:23)
at minifyDictionary (/Users/lukasoppermann/Repos/design-token-transformer/node_modules/style-dictionary/lib/common/formats.js:80:23)
at minifyDictionary (/Users/lukasoppermann/Repos/design-token-transformer/node_modules/style-dictionary/lib/common/formats.js:80:23)
at minifyDictionary (/Users/lukasoppermann/Repos/design-token-transformer/node_modules/style-dictionary/lib/common/formats.js:80:23)
at minifyDictionary (/Users/lukasoppermann/Repos/design-token-transformer/node_modules/style-dictionary/lib/common/formats.js:80:23)
at minifyDictionary (/Users/lukasoppermann/Repos/design-token-transformer/node_modules/style-dictionary/lib/common/formats.js:80:23)
at minifyDictionary (/Users/lukasoppermann/Repos/design-token-transformer/node_modules/style-dictionary/lib/common/formats.js:80:23)
at minifyDictionary (/Users/lukasoppermann/Repos/design-token-transformer/node_modules/style-dictionary/lib/common/formats.js:80:23)
The text was updated successfully, but these errors were encountered: