After upgrading to Catalina, I encountered the error below. Seems Xcode was no longer available.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Try the following in your terminal; otherwise, head to https://developer.apple.com/download/more/ and download Xcode manually.
Adding here for reference (tried this in Mac OS X Mojave):
# To set an environment variable, enter the following command:
launchctl setenv variable "value"
# To find out if an environment variable is set, use the following command:
launchctl getenv variable
# To clear an environment variable, use the following command:
launchctl unsetenv variable
I occasionally get fatal, such as:
error: cannot lock ref 'refs/remotes/origin/AB-123': is at dffbe642f088781a5e485227927e141ddb73443a but expected e377921a6d00f4d4c0463774990e03343683177e
Rebasing doesn’t work, but if you do the following it will resolve it:
git gc --prune=now
This guarantees to remove all git garbage.
NOTE: Make sure all your code has been committed before doing this.
Adding this here in case I need to refer to it in the future.
git reset --soft HEAD~3 && git commit
Where ~3 means squashing last 3 commits into one.
Adding here as reference.
- node -v
- npm cache clean -f
- npm install -g n
- n stable\
- node -v