Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Solution to yarn global add does not work on Windows (command not found)
$yarnPath = & yarn global bin
$path = [System.Environment]::GetEnvironmentVariable("PATH", [System.EnvironmentVariableTarget]::User)
[System.Environment]::SetEnvironmentVariable("PATH", "$path;$yarnPath", [System.EnvironmentVariableTarget]::User)
# Your yarn path should appear at the end of the path now
[System.Environment]::GetEnvironmentVariable("PATH", [System.EnvironmentVariableTarget]::User)
# Try a global command, for example gatsby. If you're using Visual Studio Code, you'll need to restart the IDE
gatsby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.