Open doug-wade opened 8 months ago
Could you try on the v4 branch perhaps to see if it's still a problem there? the offending code has been refactored a fair bit.
See changelog for the breaking changes, needed when migrating https://github.com/amzn/style-dictionary/blob/v4/CHANGELOG.md
I tried it out on my project and while it does not resolve the issue, it does change the stack trace somewhat
» npx style-dictionary@4.0.0-prerelease.23 build
ios
android
android-asset
No tokens for StyleDictionaryIcons.h. File not created.
No tokens for StyleDictionaryIcons.m. File not created.
undefined:38
if (Object.hasOwn(token, `${options.usesDtcg ? '$' : ''}value`)) {
^
RangeError: Maximum call stack size exceeded
at String.hasOwn (<anonymous>)
at Function.hasOwn (<anonymous>)
at buildDictionary (eval at <anonymous> (file:///Users/doug/code/odyssey-tokens/node_modules/lodash-es/template.js:259:12), <anonymous>:38:14)
at buildDictionary (eval at <anonymous> (file:///Users/doug/code/odyssey-tokens/node_modules/lodash-es/template.js:259:12), <anonymous>:56:48)
at buildDictionary (eval at <anonymous> (file:///Users/doug/code/odyssey-tokens/node_modules/lodash-es/template.js:259:12), <anonymous>:56:48)
at buildDictionary (eval at <anonymous> (file:///Users/doug/code/odyssey-tokens/node_modules/lodash-es/template.js:259:12), <anonymous>:56:48)
at buildDictionary (eval at <anonymous> (file:///Users/doug/code/odyssey-tokens/node_modules/lodash-es/template.js:259:12), <anonymous>:56:48)
at buildDictionary (eval at <anonymous> (file:///Users/doug/code/odyssey-tokens/node_modules/lodash-es/template.js:259:12), <anonymous>:56:48)
at buildDictionary (eval at <anonymous> (file:///Users/doug/code/odyssey-tokens/node_modules/lodash-es/template.js:259:12), <anonymous>:56:48)
at buildDictionary (eval at <anonymous> (file:///Users/doug/code/odyssey-tokens/node_modules/lodash-es/template.js:259:12), <anonymous>:56:48)
Node.js v20.12.0
I'm trying to set up a new project, with the following file structure
However, I'm getting an error from lodash when I try to build the project. To reproduce
1.) Create a new project 2.) Copy-paste the complete config.json example 3.) Run
style-dictionary build