Skip to content
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

node command not recognised in Terminal but works well in VSCode terminal #702

Open
brianpham93 opened this issue Mar 20, 2022 · 1 comment

Comments

@brianpham93
Copy link

brianpham93 commented Mar 20, 2022

I'm using fish shell on macOS and just installed fnm via homebrew.

It first worked well for me in both Terminal.app and VSCode's terminal. After restart, now fnm command is still recognized in Terminal.appbut not node. I tried fnm install, fnm use or fnm default on the same shell session and open new session to test but unfortunately, node is still not recognized

When I tried opening VSCode, surprisingly it's recognized there

Here's my $PATH

/Users/brian/node_modules/.bin /opt/homebrew/bin /opt/homebrew/sbin /opt/homebrew/opt/ncurses/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Library/Apple/usr/bin /opt/homebrew/bin

fnm env output:

set -gx PATH "/Users/brian/Library/Caches/fnm_multishells/6924_1647763200948/bin" $PATH;
set -gx FNM_MULTISHELL_PATH "/Users/brian/Library/Caches/fnm_multishells/6924_1647763200948";
set -gx FNM_VERSION_FILE_STRATEGY "local";
set -gx FNM_DIR "/Users/brian/Library/Application Support/fnm";
set -gx FNM_LOGLEVEL "info";
set -gx FNM_NODE_DIST_MIRROR "https://nodejs.org/dist";
set -gx FNM_ARCH "arm64";

~/.config/fish/conf.d/fnm.fish

fnm env --use-on-cd | source
@Schniz
Copy link
Owner

Schniz commented Mar 20, 2022

Based on your $PATH, it looks like fnm env --use-on-cd | source was not called. Can you try executing that command manually and see if node is available afterwards?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants