xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
This is the error I get in VS Code's terminal. There are error squiggles under the "#include <stdio.h>" line.
This is after I upgraded to Mac OS Monterey.
What is the reason for this error and what is the solution?