Brownie ParserError openzeppelin/contracts/token/ERC20/ERC20.sol when deploying on default local ganache
ParserError: Source "@openzeppelin/contracts/token/ERC20/ERC20.sol" not found: File not found.
While I'm deploying with brownie on default local ganache-cli.
Command:
$ brownie compile
gets:
Brownie v1.17.2 - Python development framework for Ethereum
Compiling contracts...
Solc version: 0.8.11
Optimizer: Enabled Runs: 200
EVM Version: Istanbul
CompilerError: solc returned the following errors:
ParserError: Source "@openzeppelin/contracts/token/ERC20/ERC20.sol" not found: File not found.
Token file head:
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract InvestToken is ERC20 {
brownie-config.yaml file:
dependencies:
# - <organization/repo>@<version>
- OpenZeppelin/[email protected]
compiler:
solc:
remappings:
- '@openzeppelin = OpenZeppelin/[email protected]'
command:
$brownie pm install OpenZeppelin/[email protected]
gets:
FileExistsError("Package is aleady installed")
I made a mistake in the brownie-config.yaml file:
I wrote:
remappings:
- '@openzeppelin = OpenZeppelin/[email protected]'
and it is
remappings:
- '@openzeppelin=OpenZeppelin/[email protected]'
sorry about that