When I installed VSCode, oh-my-zsh and NVM using homebrew I had the same issue. It appears to put wrong paths in ~/.zshrc (might be the same for bash).

Solution:

  1. Open ~/.zshrc or ~/.bashrc
  2. Create a backup of that file in case something goes wrong
  3. Compare paths under the line

export NVM_DIR="$HOME/.nvm"

  1. Now you need to fix the two paths if different than those below

[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

  1. Type source ~/.zshrc or source ~/.bashrc in terminal depending on what you use.
  2. Restart VSCode built-in terminal and see if that helped. Good luck!
Answer from orlovvvv on Stack Overflow
🌐
Stack Exchange
apple.stackexchange.com › questions › 443293 › zsh-command-not-found-node-in-vscode-mac-os
macos - zsh: command not found: node in vscode ( MAC OS ) - Ask Different
I have installed node LTS (16.15.1) version in my mac machine using brew and nvm. Following these steps : How To Install NVM on macOS with Homebrew · I'm able see node and npm version in terminal, but in vs-code terminal it shows zsh: command not found: node.
🌐
Medium
medium.com › @agarwalprashant355 › how-do-i-install-nvm-802a66f2662
How do i install NVM?. If you get the error “zsh
December 8, 2022 - If you get the error “zsh: command not found: nvm” in your terminal, it means that the nvm command is not recognized by the shell. This can…
🌐
Bobby Hadz
bobbyhadz.com › blog › nvm-command-not-found
nvm: command not found error [Solved] | bobbyhadz
~/.profile # 👇️ verify nvm installed command -v nvm · If running command -v nvm still returns nvm: command not found, check out the troubleshooting section in the nvm repository.
🌐
GitHub
github.com › microsoft › vscode › issues › 143061
VSCode terminal task not using zsh profile · Issue #143061 · microsoft/vscode
February 14, 2022 - I'm trying to run a task on window load in VSCode where a terminal opens and nvm use is run by default. However, running this shell task seems to not load my zsh profile. The output I get from running my task is: zsh:1: command not found...
Published   Feb 14, 2022
🌐
Reddit
reddit.com › r/node › [deleted by user]
VSCode can't find nvm but my mac terminal can : r/node
May 4, 2022 - I assume, your mac uses zsh instead of bash, you need to change your vscode terminal to use zsh as well ... This is just a guess, but try launching VSCode using the code command from a shell that’s using the version you want to use.
Find elsewhere
🌐
DEV Community
dev.to › duhbhavesh › nvm-command-not-found-1ho
nvm command not found :( - DEV Community
April 13, 2021 - Running either of the above commands downloads a script and runs it, but if you type nvm and if you get bash: nvm: command not found it happens because the source is missing from the following profile files · ~/.bash_profile, ~/.zshrc, ~/.profile, ...
🌐
Reactgo
reactgo.com › home › how to fix the nvm command not found error
How to fix the nvm command not found Error | Reactgo
July 4, 2023 - To solve the command not found issue, you need to add the following code to your bash file ( /.bashrc) or zsh file (/.zshrc) and restart your terminal. export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads ...
🌐
Restack
restack.io › p › ai-data-management-certification-answer-zsh-command-not-found-nvm
Zsh Command Not Found Nvm Error | Restackio
VSCode Integration: If you are using Visual Studio Code (VSCode), ensure that it recognizes the nvm version. Close all VSCode instances and restart the application after setting the default Node version with: ... By following these steps, you should be able to resolve the zsh: command not found: ...
🌐
ElderNode
eldernode.com › instant vps server › tutorials › fix: “zsh: command not found: nvm” error on mac
Fix: "zsh: command not found: nvm" Error on Mac - ElderNode
May 4, 2025 - Checking out nvm installation process, amending the .zshrc file by including necessary configurations and saving it for changes update will all enable you have nvm working properly without “command not found” errors.
🌐
GitHub
gist.github.com › stormwild › 8ff4328c6f8b92ba4d4b4a0908c324f6
Visual Studio Code NVM Node Integrated Terminal Issue · GitHub
Launching Visual Studio Code from the terminal using code and then opening a terminal allows nvm to load.
🌐
GitHub
github.com › nvm-sh › nvm › issues › 2311
NVM command not found after terminal restart. · Issue #2311 · nvm-sh/nvm
September 29, 2020 - nvm --version: v0.36.0 $TERM_PROGRAM: Apple_Terminal $SHELL: /bin/zsh $SHLVL: 1 whoami: 'tyleryoungblood' ${HOME}: /Users/tyleryoungblood ${NVM_DIR}: '${HOME}/.nvm' ${PATH}: ${NVM_DIR}/versions/node/v8.9.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin $PREFIX: '' ${NPM_CONFIG_PREFIX}: '' $NVM_NODEJS_ORG_MIRROR: '' $NVM_IOJS_ORG_MIRROR: '' shell version: 'zsh 5.7.1 (x86_64-apple-darwin19.0)' uname -a: 'Darwin 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64' checksum binary: 'shasum' OS version: Mac 10.15.5 19F101 curl: /usr/bin/c
Published   Sep 29, 2020
🌐
GitHub
github.com › nvm-sh › nvm › issues › 3440
zsh: command not found: node · Issue #3440 · nvm-sh/nvm
October 4, 2024 - I have the problem that node is not found. I assume that it has to do with the fact that the variable $(node version) has the value ‘none’. ... in the .zshrc I inserted the following lines: export NVM_DIR="$HOME/.nvm’ [ -s ‘$NVM_DIR/nvm.sh’ ] && . ‘$NVM_DIR/nvm.sh’ # This loads nvm [ -s ‘$NVM_DIR/bash_completion’ ] && .
Published   Oct 04, 2024
🌐
GitHub
github.com › Microsoft › vscode › issues › 48576
Integrated terminal does not see Node from NVM · Issue #48576 · microsoft/vscode
February 22, 2018 - export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Published   Apr 24, 2018
🌐
Syntackle
syntackle.com › blog › nvm-node-issue-command-not-found
Issue With NVM Node Version Across Terminals: Command Node Not Found
January 12, 2025 - First thing I did was, I checked the ~/.zprofile file on my system - for you it may be ~/.bash_profile or ~/.bashrc or ~/.zshrc depending on your shell - and then moved the following lines at the bottom of the file, so that no other application overrides them. For me, it was VS Code, which was overriding the PATH variable at the end of the file. - https://stackoverflow.com/a/47883587/17241798 · export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion # -- end of file
🌐
Position Is Everything
positioniseverything.net › home › nvm command not found: a detailed guide to fix this error
Nvm Command Not Found: A Detailed Guide to Fix This Error - Position Is Everything
November 11, 2025 - The nvm command not found occurs while trying to install NVM by not adding the file in ~/.bash_profile. This happens because when installing NVM, the code is added to ~/.bashrc using zsh, not bash.