1

I installed Ubuntu using WSL2 on Windows 11 and configured oh-my-zsh as my default shell. After that, I created /etc/wsl.conf and added the following lines:

[interop]
appendWindowsPath=false

to not include the Windows PATH in WSL. Now, my zsh shell can't pick any installation like node, npm or vscode. It must be because of some config edit I need to make in ~/.zshrc configuration file. What am I supposed to do here?

  • What do you mean by "can't pick any installation" .. do you mean you already installed it and its not finding it when you type it in the shell? – Jordan Jan 12 '22 at 15:55
  • It says `zsh: command not found: npm` even when npm is installed. same for node, nvm and vscode. – Gaurav Agarwal Jan 12 '22 at 17:34

1 Answers1

1

Add these few lines in the .zshrc file:

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_comp$