enter image description hereAfter writing 'truffle compile' in terminal , it just give the message i.e. compiling your contracts...and exit, no build directory is formed in Project directory. What is the issue?

  • 1
    please add error log picture in question or describe more details about question Mar 8 '19 at 6:28

Try adding this code into truffle_config.js in the module.exports part.

contracts_build_directory: "./output"

replace output with the folder you want.

  • no it's not working still the same issue @haxerl
    – YRK
    Mar 8 '19 at 13:06
  • Can you try adding another code: contracts_directory: "./contracts" to module.exports and see if it work
    – haxerl
    Mar 8 '19 at 13:56
  • And if that's still doesn't work try adding picture and your truffle-config.js file and also your contract so we can see the reason why
    – haxerl
    Mar 8 '19 at 13:58
  • I have added, please check
    – YRK
    Mar 9 '19 at 4:26

By default truffle output the compiled version of your smart contracts in ./build/contracts/.

Is there any log output saying something like:

Compiling ./contracts/HelloBlockchainWorld.sol...
Compiling ./contracts/Migrations.sol...

I might be happening that truffle cannot find smart contracts to compile. Keep in mind that by default the contracts need to be placed on the following relative path ./contracts/**/.sol from where you run `truffle

  • The following output is : truffle compile Compiling your contracts... =========================== I am compiling the contract in project directory @Gabriel G.
    – YRK
    Mar 8 '19 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.