-
Notifications
You must be signed in to change notification settings - Fork 545
Installing fnm on macOS using recommended script & Brew sets incorrect path #1376
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
Comments
I have exactly this experience on macOS right now. |
I just manually added |
@joseph-navant This worked! Thank You! |
I finally moved this to the end of my
|
I fixed this by setting the For my setup (fish shell), the sourcing happens in the
|
I do exactly the same as you do. How could such a stupid bug exist in such a widely used tool? |
Works for me.Unbelievable |
The fnm installation doesn't work on macOS when using the recommended script to install fnm (which uses Homebrew):
The script installs fnm to Homebrew's folder, typically
/opt/homebrew/bin/fnm
on macOS running ARM.However, the installation script is hard coded to set
$FNM_PATH
to$HOME/Library/Application Support/fnm
(which doesn't exist), so the code inserted into the shell file will have the incorrect path:This renders the installation broken unless the user manually corrects the path.
The README also incorrectly states that fnm is installed in that folder.
Workaround
Brew actually installs fnm correctly. If running
fnm env
in your terminal works, then you can update~/.zshrc
(or the corresponding shell file if you're using a different shell) and replace the aforementioned code with just the following:FNM_PATH
isn't actually used by fnm, so it doesn't need to be set. Updating thePATH
variable is also unnecessary if you've already verified that you can runfnm
from your terminal.The text was updated successfully, but these errors were encountered: