I developed a dapp using my PC (OS: Pop_OS!) and it was running fine. Then I had to format PC and installed new OS (Ubuntu 18.04 LTS), due to some issues in compatibility and performance.After that, I cloned the project from git and installed all dependencies using yarn and tried to compile the contracts. I was using truffle framework 5.0.7 and solidity ^0.5.0. I have done this few times in previous OS, it works fine. But, this time, when I tried to compile the contracts using "truffle compile" command, it stuck at "Compiling your contracts..." and simply exits after some time showing no error. Truffle simply not compiling the contracts.
Yeah it happened to me too with fresh truffle install, thought I had hard time replicating the issue since after. Try following:
- Check build folder and subfolder permission/owner or try deleting altogether
Check contracts folder permission/owner
Not ideal but running "sudo truffle migrate" would give an idea about source of issue, thought deleting the build folder and compiling again solved for me