1

if i run brownie compile i get INFO: Could not find files for the given pattern(s). Brownie v1.19.0 - Python development framework for Ethereum

Project has been compiled. Build artifacts saved at C:\Users\User\OneDrive\Documenten\demo\build\contracts

but its not in there

1 Answer 1

0

I had the same problem and tried a variety of approaches to force brownie to compile my code. There was no error. I just did not produce anything even though the output of the compile command indicated compilation had completed.

When else does brownie compile say it succeeded but nothing happens? When there is nothing in the contracts directory.

Solution:

It turns out that I had created my Solidity contract file with a .Sol contract extension instead of .sol. Compilation succeeded without any issue once I renamed the file to have a lower-case 's' in the extension.

The lesson:

brownie is looking for files in the contracts folder with all lower-case .sol as a filename extension. If there is nothing in the contracts folder or no file with a lower-case .sol filename extension, brownie will say it compiled successfully but really do nothing.

2
  • Are you a human being? It is a too long answer, just to suggest checking the files extension to be .sol.
    – Ismael
    Jan 21, 2023 at 2:33
  • Sorry I'm too verbose for you. Some people like to draw stick-people, others like to paint complete pictures. I wasn't just giving narrow facts, but the background as well. Are you a troll? Jan 21, 2023 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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