amzn / style-dictionary

A build system for creating cross-platform styles.
https://styledictionary.com
Apache License 2.0
3.94k stars 558 forks source link

Unable to install and build properly #1307

Closed soundharsaminathan closed 2 months ago

soundharsaminathan commented 3 months ago

image image

jorenbroekema commented 2 months ago

Hm this may be a bug where the copy_assets action is trying to copy a folder target to folder destination, and copyFile may be expecting files rather than folders.

Can you go into your node_modules/style-dictionary/lib/common/actions.js and on Line 81 change it to:

return vol.promises.cp('assets', config.buildPath + 'assets');

so using cp instead of copyFile?

Let me know if that solves your issue, then I'll flag this as bug and someone can create a PR with this fix

forgantini commented 2 months ago

if you add { recursive: true } it seems to fix the bug

forgantini commented 2 months ago
Screenshot 2024-09-02 alle 14 10 25

but there is still an issue on the unlink if you call the cleanAllPlatforms method

jorenbroekema commented 2 months ago

I created a PR here https://github.com/amzn/style-dictionary/pull/1329 to fix it