-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edgecase for 'nvm is not compatible with the npm config "prefix" option' error #2261
Comments
You're definitely not the first person who's reported that the capitalization of their I'd be happy to accept a PR for a documentation section and/or a warning in nvm's output itself in this case instructing users (probably on mac only, for now?) to compare |
Fixed by #2263. |
Operating system and version:
MacOS Catalina 10.15.6
nvm debug
output:nvm ls
output:How did you install
nvm
?Install script
What steps did you perform?
What happened?
I was doing a clean install of nvm without any external installations of node or npm, I had made sure 1000% that there were no installations of node or npm prior to the installation of nvm.
When I was installing a node version, after having successfully installed nvm, I would always get a
Immediately after the message, running the
list
command would output as if the installation was successful, however runningnode -v
would fail, as if node was not installed.What did you expect to happen?
For the installation to be successful.
Is there anything in any of your profile files that modifies the
PATH
?No.
The issue
Long story short, about a month back I was on MacOS High Sierra. I had to do a clean install of the OS and Catalina was used.
After recreating my user I did a restore from a TimeMachine backup.
Now, I've had this machine since 2015. At that time the OS apparently allowed you to have an account name that started with a capital letter. When I recreated my account on Catalina, I found out that the OS no longer allows to capitalise the username upon account creation.
Thus I ended up with a user
mitch
instead ofMitch
, which is what it was named originally.When I did the backup restore, my home folder must have been renamed back to "Mitch" from "mitch".
The OS, however, still regarded my home folder path as
/Users/mitch
, as seen from runningecho $HOME
and also from looking at the advanced account settings from the System Preferences.Since the file system I am using is case insensitive, both
/Users/mitch
and/Users/Mitch
work.After not being able to find a solution to my issue, after having wasted quite a few hours on it, and there was no other installation of npm or node, I decided to change the home directory path from
/Users/mitch
to/Users/Mitch
, as "Mitch" is the actual name of my home directory.This must have been of importance for nvm, because changing the path from System Preferences, resolved all my issues.
This is a freak-edgecase for this error, but if you'd like I could at least open up a PR which adds a warning that "home directory path is case sensitive" or something like that, or even attempt to adjust the code itself, and offer a code PR.
The text was updated successfully, but these errors were encountered: