Hi guys, I am still getting this error using openzeppelin 3.3.0 library, solidity compiler 0.7.6, and truffle v5.1.60.
I tried to downgrade the truffle to v5.1.59 and v5.1.58 but it did not help. And with the message saying “Error: Could not find \n import from any sources;” I have no idea what is wrong. (It would be great if truffle would improve this error message.)
The only thing I know is that when I remove import from openzeppelin library, the compilation works again.
I installed openzeppelin package through npm locally and my import is as follows:
import “@openzeppelin/contracts/utils/EnumerableSet.sol”
I wasn’t able to reproduce on Windows 10 using a simple contract.
Can you try compiling this contract and share the output so we can see the errors?
What operating system, node and npm version are you using?
Hi @abcoathup, thank you for the reaction. I tried to find the minimal working example, in which, it is easy to see the syntax error I made - missing semicolon in the first import. If I miss the semicolon in the second import, the error message is fine. While these things seem funny in the minimalistic example, if one has multiple imports and hundred lines of code, it is not easy to find the problem and the error message really does not help. However, this is the issue of solidity compiler, not Openzeppelin.