// contracts/OurToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

contract OurToken is ERC20 {
constructor(uint256 initialSupply) ERC20("tkname", "tkn") {
    _mint(msg.sender, initialSupply);

this are my helpful-scripts py

  - OpenZeppelin/openzeppelin-contracts@4.2.0
      - '@openzeppelin=OpenZeppelin/openzeppelin-contracts@4.2.0'
dotenv: .env
  from_key: ${PRIVATE_KEY}

error ParserError: Source "@openzeppelin/contracts/token/ERC20/ERC20.sol" not found: File not found. Searched the following locations: "". --> contracts/OurToken.sol:5:1: | 5 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1 Answer 1


seems like you are simply just missing to install the OpenZeppelin library in your project. To fix the issue, you can simply run the following command

npm install @openzeppelin/contracts

Try to check whether you can find any @openzeppelin folder under node_modules. If there is, then the import should not fail.

Hope this helps~

Your Answer

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

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