If you have a solidity project that runs in one truffle environment but you get an error message in another installed truffle environment, like "Compilation failed", the problem might be that the truffle environment is not up-to-date. You can simply force a reinstall to make your truffle up-to-date. Like with the following command:
npm install -g truffle