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.
Truffle 0.5 downloads
solc when you execute the compile command. I'm not sure, but maybe Truffle hangs trying to download that. Is it possible there is a firewall or similar preventing Truffle from hitting the network?
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
same problem for me, just run command with sudo and it will work