I had the same error after updating angular every time after opening the terminal.
Depending on which terminal you use either open configuration file which will be saved in ~/.bashrc, or for zshell ~/.zshrc, and so on for others,
Edit the corresponding ~/.bashrc
or ~/.zshrc
file and delete or comment this line:
source <(ng completion script)
Sadly you will lose the angular autocompletion, but it looks like there is some bug causing this in their implementation