Yarn global command not working

后端 未结 9 1920
孤独总比滥情好
孤独总比滥情好 2020-12-12 13:07

I\'m working with Yarn v0.16.1. If I understand correctly (according to the documentation), yarn global add should be the equivalent of np

9条回答
  •  旧巷少年郎
    2020-12-12 14:10

    AndrewD gave a great answer, but for those on Windows it's a bit different, especially step 3.

    Please do not use the command setx as @Thapedict said. It will remove all your previous paths you had and replace it with only the given directory. If you want to use setx, I think there might be a flag to make it append the existing path variables, but I don't know which one. Using only setx will not append to it.

    I would just do System Properties > Advanced > Environment Variables > Edit Path > New > c:\users\YOURUSERNAME\appdata\local\yarn\bin

    to make sure you don't remove your previous variables.

提交回复
热议问题