Using macOS 14.6.1 (23G93) on a MacBook Pro 16-inch, 2021 with an Apple M1 Pro chip.
Steps to reproduce
Install using curl -fsSL https://fnm.vercel.app/install | bash
Run source /Users/esseb/.zshrc as instructed
Run fnm use
Expected result
fnm should run without any errors.
Actual result
error: We can't find the necessary environment variables to replace the Node version.
You should setup your shell profile to evaluate `fnm env`, see https://github.com/Schniz/fnm#shell-setup on how to do this
Check out our documentation for more information: https://fnm.vercel.app
# fnm
FNM_PATH="/Users/esseb/Library/Application Support/fnm"
if [ -d "$FNM_PATH" ]; then
export PATH="/Users/esseb/Library/Application Support/fnm:$PATH"
eval "`fnm env`"
fi
The folder that FNM_PATH refers to is never created in download_fnm when using homebrew, however, so the if statement is not true and fnm env does not get run.
Using macOS 14.6.1 (23G93) on a MacBook Pro 16-inch, 2021 with an Apple M1 Pro chip.
Steps to reproduce
curl -fsSL https://fnm.vercel.app/install | bash
source /Users/esseb/.zshrc
as instructedfnm use
Expected result
fnm
should run without any errors.Actual result
Further information
I think the bug is because
setup_shell
in https://fnm.vercel.app/install appends this to.zshrc
:The folder that
FNM_PATH
refers to is never created indownload_fnm
when using homebrew, however, so the if statement is not true andfnm env
does not get run.