This is the error code: enter image description here

Adoption.sol code: enter image description here

TestAdoption.sol code: enter image description here

I dont know how to solve this, it fails when i try to use this comand: "truffle test". Thanks.


delete everything inside your build folder in your truffle root project. and then repeat

truffle compile
truffle migrate
truffle test

hope this help


Which truffle version are you using? I had same issue and I was using v5.1.15, the latest version for now. And I try an old v5.1.10 and it works. It's due to a compilation OS-compatibility path issue. Here you can find an article about it: https://github.com/trufflesuite/truffle/issues/2834#issuecomment-588321875


npm uninstall -g truffle

npm install -g truffle@5.1.10 (always got me back on track)


uninstall and install truffle helped me!

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.