0

I am well versed with solidity and often use Remix IDE. Quite recently, despite adding a compiler version in my code. I am still getting this warning

Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.6.5;".

The code:

pragma solidity ^0.6.5;'
Contact A{
<Something>
}

Any guidance, why is this happening?

Edit: It works fine in incognito mode.

2
  • I wish I knew the answer to this, it happens to me 80% of the time. Sometimes closing remix and starting fresh helps.. but this error is happening for no reason as far as i can tell. What is incognito mode?
    – bobbert
    May 5 at 4:49
  • Backup your files and remove all cookies. That should start a fresh remix. If the problem continue then it is not remix, but something in your files. Try using a fixed version pragma solidity =0.6.5; and select.
    – Ismael
    May 5 at 5:31
0

hope it's not too late to answer this.

i had this issue too. apparently it was due to a failure in getting one of the dependencies (think import "";) files which resulted in a blank dependency.

when calling that import, it always turns this error.

i fixed it by removing my .deps/github folder to resync all the github dependencies (or any other dependencies you have)

hope this helps

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.