After the system is upgraded, an error message appears when using brew
/usr/local/Homebrew/Library/Homebrew/version.rb:368:in `initialize': Version value must be a string; got a NilClass () (TypeError)
Solution:
brew update-reset
After the brew upgrade is completed, it will be used normally.