[SOLVED] Compilation error when migrating to truffle

Hello, i’m stuck here, i was trying to migrate truffle using vscode and its shows this error below. Please help.


ParserError: Source "project:/node_modules/@openzeppelin/token/ERC721/ERC721.sol" not found
 --> project:/contracts/MrGrandPaDogeToken.sol:3:1:
  |
3 | import "../node_modules/@openzeppelin/token/ERC721/ERC721.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

,ParserError: Source "project:/node_modules/@openzeppelin/contracts/utils/Counters.sol" not found
 --> project:/contracts/MrGrandPaDogeToken.sol:4:1:
  |
4 | import "../node_modules/@openzeppelin/contracts/utils/Counters.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Compilation failed. See above.
Truffle v5.4.23 (core: 5.4.23)
Node v14.18.0

it looks like it don’t find those imported files, did you install openzeppelin?

I figured it out and its fixed

1 Like