When attempting to issue an _'nvm use
Make sure the mklink
function is available in git-bash. NVM uses this command to manage which version of node to use.
That makes sense. I'll look into mklink in git-bash, it probably conflicts with _ln_ that is part of the git distro for Windows.
I've been experiencing this as well. As a workaround, I just open up a normal cmd
window, and then run nvm use
from that. I'm also attempting to see if I can find a way to have mklink
usable in git-bash.
I'm closing this due to a) age and b) because I think the issue has to do with mklink
compatibility. And I guess c) git-bash is it's own shell and I can't support every custom shell (PR's totally welcome though!).
Thought I'd provide an update on this. I tested this again with git bash version 2.9.2 today and the mklink function is now working correctly, so nvm use
can now be executed correctly from a git bash terminal. Thanks again for providing this tool. Invaluable to users that have to perform some development on the Windows platform.
Thanks for the update, and it's quite awesome this is working in the latest git bash shell!
Hi @Daren-J-Smith. What version of Windows are you running?
Also, did you choose the "_Use Git from the Windows Command Prompt_" option when installing Git 2.9.2?
I just installed NVM 1.1.1 on Win7 Pro 64-bit as per this comment but I get "_command not found_" when I attempt to run mklink
from the 2.9.2.windows.1 bash shell:
RMirro ~
$ git --version
git version 2.9.2.windows.1
RMirro ~
$ mklink
bash: mklink: command not found
mklink
is available when I use the windows command prompt (cmd):
C:\Users\rmirro>mklink
Creates a symbolic link.
MKLINK [[/D] | [/H] | [/J]] Link Target
/D Creates a directory symbolic link. Default is a file
symbolic link.
/H Creates a hard link instead of a symbolic link.
/J Creates a Directory Junction.
Link specifies the new symbolic link name.
Target specifies the path (relative or absolute) that the new link
refers to.
Thanks!
I was able to resolve this issue.
Most helpful comment
Thought I'd provide an update on this. I tested this again with git bash version 2.9.2 today and the mklink function is now working correctly, so
nvm use
can now be executed correctly from a git bash terminal. Thanks again for providing this tool. Invaluable to users that have to perform some development on the Windows platform.