Search code examples
bashnpmterminalzshwindows-subsystem-for-linux

Windows subsystem for Linux - cannot find npm after zsh/oh-my-zsh install


I have installed zsh and oh-my-zsh on WSL following this tutorial. They both work fine but it seems that my previous installs don't work, such as npm.

Does anything else need to be done?


Solution

  • Duplicate of Adding a new entry to the PATH variable in ZSH

    add this line to .zshrc: export PATH=$PATH (add path of npm if not already in $PATH.) source ~/.zshrc

    or do one of these: echo -n 'export PATH=~/bin:$PATH' >> ~/.zshrc

    echo -n 'export PATH=$HOME/bin:$PATH' >> ~/.zshrc