I installed yarn using npm: npm i -g yarn
when I execute the command yarn -v
or any other yarn command on cmd or PowerShell it Outputs the Version
But on GitBash it displays: C:\Users\<my_username>\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found
I even tried Reinstalling Node & Yarn but it still doesn't work.
1 solution I found is that instead of yarn if I use yarn.cmd
then it works in GitBash.
But I'm unable to find the reason & the correct solution for this problem. If someone has any Idea please Guide me.
I tried so many things and in the end I'm not sure which really worked. Maybe you find out that another step works in your case.
So here's some of the sensible things I did:
Now, if the last step was the one that worked, make sure to run npm uninstall -g yarn
after
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With