C:\joyee\study>nvm install 0.10.38
C:\joyee\study>nvm use 0.10.38
C:\joyee\study>node -v
And I got
'node' is not recognized as an internal or external command, operable program or batch file.
So I went to check %NVM_SYMLINK%
, there was just one node_modules
folder. I searched the disk for node.exe and found my node installed under C:\Users\Joyee\AppData\Roaming\nvm\version
, but there weren't any symbol links anywhere else. I tried to run cmd as administrator, but it didn't help.
I'm using Windows 8 64bit and I've uninstalled node before installing nvm. I just installed nvm today so the installer is the latest one.
Edit: One more weird thing:
C:\joyee\study>nvm list
0.12.2
0.10.38
C:\joyee\study>nvm use 0.10.38
Now using node v0.10.38 (64-bit)
C:\joyee\study>nvm list
0.12.2
0.10.38
There aren't any "in use" versions.
Encoutered same bug today.
Fixed it deleting trailing nodejs folder after nodejs uninstall (under _program files_), opening cmd as an administrator and running nvm use [version]
The weird thing is, I didn't have trailing nodejs folder after I uninstalled it (checked with everything), and I did try running cmd as an administrator.
This happened to me when a colleague installed nvm
without uninstalling node
first.
If you are able to use the nvm
command, make sure you run nvm on
.
We found that nvm
wont activate itself when it detects a previous version of node
on the machine but it would set its state to off
.
Same issue, deleting the _contents_ of nodejs folder from my previous node install fixed it. I assume there may just be something in it that was failing for lack of a permission?
We've just been fighting with nvm for the last two hours and it turned out we just needed to run' nvm on
. @whitneyit - thank you for getting us up and running!!!
@metasean No problem buddy. I'm glad that I was able to help :smile:
I have the same issue. nvm is able to download and install any version of node but I can do all the nvm on
and nvm use X.X.X
it is not working.
I manually tried to execute the command to create a symlink using admin rights:
"C:\Windows\SysWOW64\cmd.exe" /C mklink /D C:\bin\nodejs C:\bin\nvm\v0.12.0
The system said: You do not have sufficient privilege to perform this operation.
Following this link: http://superuser.com/a/125981
I went to the Local Security Policy interface:
Security settings > Local Policies > User Right Assignement > Create Symbolic links
I am not in the list and I can't add myself. It seems that the default security policies in my company do not allow me to create symbolic link. I'm now waiting for IT to add me to the white list...
Am I missing something?
Thanks!
@Kylir; if you can't change security polocies, try launching an elevated command prompt instead (aka: "Start" > type "cmd" > right-click and "run as administrator").
FWIW, for me @whitneyit's suggestion to "run nvm on
" fixed it for me.
(Although I had uninstalled Node in add/remove programs before installing nvm, appears the nodejs folder was still there under program files)
Thanks @whitneyit . You made my day! I've spend long hours trying to fix it and your solution was almost magic!
I have to remove existing nodejs folder "C:\Program Filesnodejs" and create symlink manually to make it work, in my case the command is:
mklink /j "C:\Program Filesnodejs" "C:\Users\hungcao\AppData\Roamingnvm\v6.7.0"
update: From this post on using symlink there is a contraint that you need to be aware of: "If you're symlinking a directory, it's important that there not be a directory or file with the same name". Even though we uninstall old nodejs installation, if the folder still exist so it can stop nvm to create symlink. The bad thing is that nvm does not show any error or warning
Same issue:
Same issue on my Win 10 Home 64 bit
deleting the folder fixed it
$ node -v
v4.7.2
but i have some problems with npm:
$ npm -v
module.js:327
throw err;
^
Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:990:3
module.js:327
throw err;
^
Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:990:3
the node_modules folder is empty.
Obviously npm install
doesn't work.
EDIT: I solved it by downloading manually the zip of the release of node 4.7.2 and put its node_modules folder into C:\Program Filesnodejsnode_modules
That means every time i install a node version i should download manually the node_modules folder related to that node version. That's rude!
Thank you all for this. Ran into the same issue, was trying to make the symlink where my old node install was, and I didn't realize that the uninstaller had left some python dependencies behind...
I don't have an old node install to remove, running as administrator but I'm still getting the same problem as those above. I saved it in a non-standard directory, but the symlink's fine as far as I can tell.
# created by me
位 echo %PATH% | tr ; '\n'
D:\Program Files HDD\cmder\bin
D:\Program Files HDD\cmder\vendor\git-for-windows\cmd
D:\Program Files HDD\cmder\vendor\conemu-maximus5\ConEmu\Scripts
D:\Program Files HDD\cmder\vendor\conemu-maximus5
D:\Program Files HDD\cmder\vendor\conemu-maximus5\ConEmu
E:\Programs\nvm
E:\Programs\nvm # assuming this is coming from NVM_SYMLINK and NVM_HOME
D:\Program Files HDD\cmder\vendor\git-for-windows\usr\bin
D:\Program Files HDD\cmder\vendor\git-for-windows\usr\share\vim\vim74
D:\Program Files HDD\cmder\
@astoellis - I know it says it's using v6.9.5, but you may want to try nvm use 6.9.5
anyway. I suspect your issue may be with cmder... I've seen a few issues crop up with cmder somewhat recently. If that doesn't work, try a plain terminal window to determine if it's nvm4w or cmder.
Thanks @coreybutler I'll check that out right now.
Yup, you were on the 馃挵 . Dammit cmder.
I resolved this problem by unistall all nvm, node.js, npm related things, then reinstall nvm executed 'nvm on' and install node , now it's fine
Using cmd.exe to execute nvm use <version>
instead of git bash, etc
if we select path in setup that is obvious exists but actually for symlink it shouldn't so need to delete nodejs folder and nvm use again. I have made troubleshooting steps. Hope it helps.
Had uninstall node install in windows through .msi file.
Use nvm to install node version
nvm use -version
work fine.
able to run node -v
but npm is not working
'npm' is not recognized as an internal or external command,
operable program or batch file.
Slightly related issue - In case you specify a folder - that will contain the symlink - that doesn't exist, nvm will appear to work but fails silently. So e.g. if you specify _c:\devnodejs_nvm_ within which the _nodejs_ link will be create. You must create _nodejs_nvm_ folder, nvm will not do it for you. If you don't create nvm will fail silently
I'm having the same issue.
nvm on
nvm list
returned nothingnvm install latest
nvm install 7.7.1
nvm use 10.0.0 x64
lists both version numbers but neither is selectednvm use 7.7.1 x64
lists both version numbers but neither is selectednode -v
returns 'node is not recognized as an internal...'nvm arch
returns
System Default: 64-bit
Currently Configured: -bit
nvm arch 64
doesn't change that
I verified both paths exist in System vars. I tried this process a few times, each time verifying there were no remaining nodejs or npm folders anywhere before installing nvm.
Any ideas?
Most helpful comment
This happened to me when a colleague installed
nvm
without uninstallingnode
first.If you are able to use the
nvm
command, make sure you runnvm on
.We found that
nvm
wont activate itself when it detects a previous version ofnode
on the machine but it would set its state tooff
.