Skip to content
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

No generation on WSL #14

Open
allurefx opened this issue Dec 20, 2020 · 6 comments
Open

No generation on WSL #14

allurefx opened this issue Dec 20, 2020 · 6 comments

Comments

@allurefx
Copy link

allurefx commented Dec 20, 2020

I installed the Adobe XD extension (1.1.2) on both the Windows 10 and WSL:Ubuntu VSCode versions. The Windows version generates the code, but not the WSL version. I need Flutter/Dart, but even other languages aren't generating. On the WSL version, the dsp folder gets generated, with assets/, data/, and dsp.json, installs dist/styledictionary/ with node_modules/, etc. but doesn't actually generate the code. I thought it's a path issue where the generator isn't finding the path, but there is no error displayed, says the generation completed successfully.

@carlohcs
Copy link

@allurefx I am having the same problem and nothing is being generated by the extension (1.1.2 too).
In the first time when I used the extension, worked. Now I am in another computer (Ubuntu) and doesn't work. Just the JSON files are being generated.

@demianborba
Copy link
Collaborator

demianborba commented Mar 30, 2021

@allurefx @carlohcs can you please try again with our latest version (v1.1.4)? It fixes some of the path resolving issues you might be seeing. https://marketplace.visualstudio.com/items?itemName=Adobe.xd

@carlohcs
Copy link

@demianborba nothing changed! I tried to install other versions of the extension, but nothing changed. Stack: Ubuntu (18.04.5 LTS), VSCode (1.56.0)
image

@TheKvist
Copy link

TheKvist commented May 26, 2022

@demianborba Any updates on this? Having the exact same issue as @carlohcs with my WSL 2 configuration. Very sad to see this has not been fixed in a year now.

@TheKvist
Copy link

TheKvist commented May 26, 2022

So, it turns out that the fix to the problem is dead simple. I dug around in the extension code located in extension-bundle.js in my .vscode-server directory in the WSL and found the culprit:

In the function that generates the style-dictionary config file, the template file build/SDconfig.template.js is loaded from the extension directory. However, in the call to the path resolver in the function, the file name is mistakenly spelt as "build/SDConfig.template.js" with a capital C in "SDConfig". The reason why it doesn't crash on Windows or Mac OS X is that their file systems are not case sensitive and so the casing of the name does not matter, it would load with any casing there. Linux' ext4 however is case sensitive, so the case mistake leads to an empty SD config file being generated, which in turn leads to the error of style-dictionary trying to iterate over the keys of a non-existing config property.

Just from looking at how this repository has not really been maintained at all, I'd suggest simply renaming the file, located inside the WSL at ~/.vscode-server/extensions/adobe.xd-1.2.3/build/SDconfig.template.js to .../SDConfig.template.js to match the path in the function call and get things working again. On an actual Linux, the same problem should exist, but there the path would be ~/.vscode/... instead of ~/.vscode-server/....

@carlohcs
Copy link

Hey @TheKvist, I gave up on this package. I think the only responsible for this it was @demianborba. And if I not wrong, he isn't more worker in Adobe. So maybe this request it will not be resolved... I started to use just Style Dictionary to solve my case. I hope you have a better experience! Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants