Error: Could not find a compiler version matching 0.8.xx. Please ensure you are specifying a valid version, constraint or build in the truffle config. Run `truffle compile --list` to see available versions.
This will happen once you have installed truffle using sudo or different version.
Delete the following temporary folder and compile it to solve the problem.
- Mac: ~/Library/Preferences/truffle-nodejs
- Ubuntu: ~/.config/truffle-nodejs