i run migrate in the terminalbut it shows

Error: Truffle is currently using solc 0.5.8, but one or more of your contracts specify "pragma solidity ^0.4.27". Please update your truffle config or pragma statement(s). enter image description here

then i follow the error and update config it doesn't work what should i do thx

  • 1
    The error is self explanatory.. your contracts are based on an earlier version of solidity. I would advise downgrading your solc compiler or setting it a different version , – Samuel Dare Aug 25 '19 at 20:59
  • there is no compiler version satisfying ^0.4.27 the latest 0.4.x compiler version is 0.4.26 and, btw, if you're using Ubuntu the config file should be named truffle.js – Igor Sobolev Aug 27 '19 at 14:01

On MacOS, change compiler settings in truffle-config.js. Also, make sure the pragma versions in your contracts are the same as in your config settings as you won't be able to run truffle compile successfully otherwise.

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.