nuru
nuru

Reputation: 11

after source ~/.zshrc, zsh terminal does not work

I try to set up react native android development environment

  1. vim ~/.zshrc
  2. paste ANDROID_SDK_ROOT environment variable
  3. source ~/.zshrc

However, the following error occurred

/Users/username/.zshrc:source:26: no such file or directory: /Users/username/.zshrc#
/Users/username/.zshrc:source:26: no such file or directory: /Users/username/.zshrc#
/Users/username/.zshrc:source:26: no such file or directory: /Users/username/.zshrc#
/Users/username/.zshrc:source:51: too many open files: /Users/username/.zshrc
/Users/username/.zshrc:source:75: too many open files: /Users/username/.oh-my-zsh/oh-my-zsh.sh
/Users/username/.zshrc:source:108: too many open files: /Users/username/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
/Users/username/.zshrc:source:109: too many open files: /Users/username/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
/opt/homebrew/Library/Homebrew/prefix.sh: line 40: echo: write error: Bad file descriptor
/Users/username/.zshrc:source:112: no such file or directory: /nvm.sh
/Users/username/.oh-my-zsh/oh-my-zsh.sh:source:61: too many open files: /Users/username/.oh-my-zsh/tools/check_for_upgrade.sh
/Users/username/.oh-my-zsh/oh-my-zsh.sh:source:122: too many open files: /Users/username/.oh-my-zsh/lib/compfix.zsh
compinit:503: cannot duplicate fd 0: too many open files
/Users/username/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh:31: write error: bad file descriptor
[256]    done       bindkey "$3"

And then zsh terminal does not work even node -v

It terminated immediately in the vscode

How can I solve this problem?

Upvotes: 1

Views: 4753

Answers (1)

Robby Russell
Robby Russell

Reputation: 51

I'm going to assume you're using Oh My Zsh given that this was tagged with oh-my-zsh. As the creator of Oh My Zsh, I would encourage you to not append your Android SDK environment variable to ~/.zshrc but consider enabling the dotenv plugin that comes packaged with Oh My Zsh.

then you can define your ANDROID_SDK_ROOT in the parent directory of your project

Upvotes: 2

Related Questions