1

I'm on WSL. I went to zsh from bash and based on this advises here I added source ~/.bashrc at the beginning of my ~/.zshrc file in order to be able to use nvm, node, npm commands in zsh. But now when I open my WSL bash, i see infinite errors like below...

enter image description here

I tried ctrl+c, exit all don't do nothing...I need to go back to my ~/.zshrc to try other ideas..

3

Run the ubuntu.exe with a specific command to bypass your login shell. Something like one of these commands:

ubuntu.exe run bash
ubuntu.exe -c bash
ubuntu.exe -c vim .zshrc

Then use bash or Vim to fix your zshrc.

Sourcing .bash_profile or .bashrc from .zshrc is terrible advice. It would be better if you copied the nodejs settings from .bashrc to .zshrc, or put them into a separate file and source that from .bashrc and .zshrc.

  • oh man, hell yes, you saved me. I'm grateful. Thank you!!! – kyw Oct 26 '18 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.