amzn / style-dictionary

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

zsh: command not found: style-dictionary #1098

Closed darkovski88 closed 7 months ago

darkovski88 commented 8 months ago

First of all, I wanted to point out that im new to this, and thanks for providing such a tool, and thanks for understanding the "minor" issue that im facing with. Issue: After following the this guide, and try to run style-dictionary init basic in my CLI(using MacOS terminal) - im facing with this issue: zsh: command not found: style-dictionary

How I end up here is that I open the terminal, navigate to the desired folder and execute the style-dictionary init basic command. Is this the proper way to initialise and run style-dictionary?

Can anyone please help out on what can the issue be? I do have node version v20.11.0 and npm installed. Any hints would be greatly appreciated.

Thanks

quasters commented 8 months ago

same problem =(

UPD: It helped me https://stackoverflow.com/a/66784953/19276981

Then install and update npm + node

And install style-dictionary, like in this answer https://stackoverflow.com/a/47766862/19276981

jorenbroekema commented 7 months ago

You can also install style-dictionary locally and proceed to use it with npx (part of npm, it uses your local installation of the binary and if it does not exist, temporarily installs it for you after giving you a prompt for permission)

npm i style-dictionary
npx style-dictionary init basic

If you want it globally you'll have to make sure of two things: