WSL Truffle import error: Could not find any sources

Hi @Proniss,

Welcome to the community :wave: and welcome to smart contract development.

I'm sorry you are having a hard time getting your contracts to compile. An easy way to start is with the following guide: Create an ERC20 using Truffle, without writing Solidity


You should be able to import as follows without having to use a relative path. This is what my imports look like:

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

I don't recommend copying the OpenZeppelin Contracts as you shouldn't modify them:

_From: https://docs.openzeppelin.com/contracts/3.x/#usage_
To keep your system secure, you should always use the installed code as-is, and neither copy-paste it from online sources, nor modify it yourself.


As an aside, I would suggest using either Solidity 0.6 or Solidity 0.7. The latest version of OpenZeppelin Contracts 3.2 has a Solidity 0.6 and a Solidity 0.7 version.

Feel free to ask all the questions that you need.