Invalid after nvm use, nvm -v 1.1.11
parlay96 opened this issue · 13 comments
What happened?
What did you expect to happen?
Version
1.1.11 or newer (Default)
Which version of Windows?
No response
Which locale?
None
Which shell are you running NVM4W in?
No response
User Permissions?
Administrative Privileges, Elevated
Is Developer Mode enabled?
None
Relevant log/console output
No response
Debug Output
Invalid after nvm use
Anything else?
No response
This doesn't make sense. You should be able to run nvm debug
. If you cannot run that, something is incorrect in the installation.
Navigate to the directory where NVM4W is installed.
It should have a nvm.exe
file in it. Run the command locally, like this:
.\nvm.exe debug
It should generate output like this:
This should give you an idea of what is wrong.
我也是同样的问题,请问你解决了吗
I don't know why there's such a problem,I had a problem installing node in the custom directory on drive D,If I install node on C drive, it will be fine, but I don't know how to solve it!
Is your D drive a hard disk? Or is it a mapped drive, network drive, etc? It's quite possible there are permission restrictions on your D drive, which is pretty common in corporate networks.
@WindBruce don't put your NVM_SYMLINK
directory inside the NVM_HOME
directory. Also, I have the zame question for you... is the D drive a physical hard disk or a shared/remote/mapped directory?
cmd use system administrator try again
Your node path cannot have Chinese characters or any spaces.
@
@WindBruce don't put your
NVM_SYMLINK
directory inside theNVM_HOME
directory. Also, I have the zame question for you... is the D drive a physical hard disk or a shared/remote/mapped directory?
My D drive is a physical hard disk. And I change the "NVM_SYMLINK" to another path ,and I installed the newest version-1.1.12, but it still doesn't work,this time got this error: "NVM_SYMLINK (D:\DevPrograms\nodejs) is not a valid symlink",
As you can see,I use a PowerShell with Administrator permission,I reset the nvm path,and type in "nvm use 20.10.0",It doest not work. This is my system environment variables setting:
Perhaps you should consider whether the sequence of installing node first and then NVM is incorrect. You should install NVM without a node.
Perhaps you should consider whether the sequence of installing node first and then NVM is incorrect. You should install NVM without a node.
I finally solved the problem and it works ok,here is what I did:
1.uninstall nvm,nodejs.
2.delete all the dirs .
3. clear system environment variables settings list above.
4. reinstall nvm ,setting dir which doesn't exist before,it will be created automately after installing is done.
5. recheck the system environment variables settings,
6. in Powershell with Administrator permission,type in "nvm install 20.10.0" "nvm use 20.10.0"
7. finally type in "npm -v",check if it works.
Completely clean the previous installations,reinstall again.
@WindBruce Glad you got it straightened out.
Since too little information is available about everyone else' situation, I'm closing this issue.
For those coming across this via Google, here are a few pointers.
- It is critical that you know your user permissions. For example, if
nvm debug
cannot find your username (like @livelyPeng's updated screenshot), then you probably don't have permissions to make many changes on your system. Remember, Windows is particular about what it allows users to install, and this is ultimately an installer that modifies your system. - Make sure
NVM_SYMLINK
does not exist at installation time. NVM4W automatically creates/manages this for you. For example, ifNVM_SYMLINK
is set toC:\nvm
, thenC:\nvm
should not already exist as a physical directory. Many people mistakenly assume they need to create this directory ahead of time, which causes a conflict when NVM4W tries to create a symlink here.
For further help, see the common issues.