# Source "@openzeppelin/contracts/token/ERC721.sol" not found: File import callback not supported

**URL:** <https://forum.openzeppelin.com/t/source-openzeppelin-contracts-token-erc721-sol-not-found-file-import-callback-not-supported/21853>\
**Category:** Contracts\
**Created:** [December 29, 2021, 5:59pm UTC](https://forum.openzeppelin.com/t/source-openzeppelin-contracts-token-erc721-sol-not-found-file-import-callback-not-supported/21853 "2021-12-29T17:59:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![revelationsz](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/revelationsz/32/11841_2.png) [@revelationsz](https://forum.openzeppelin.com/u/revelationsz)\
**Post date:** [December 29, 2021, 5:59pm UTC](https://forum.openzeppelin.com/t/source-openzeppelin-contracts-token-erc721-sol-not-found-file-import-callback-not-supported/21853/1 "2021-12-29T17:59:48Z")

</div>

Im currently using hardhat on VS code and I keep getting this error:

Source "@openzeppelin/contracts/token/ERC721.sol" not found: File import callback not supported

in my contract when I try and import things from openzeppelin

#### 🔢 Code to reproduce

```auto
pragma solidity >=0.8.9;

import "@openzeppelin/contracts/token/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol"; 

```

#### 💻 Environment

Hardhat on vs code, openzeppelin version 4.4.1 (I think)

---

<div class="post-metadata">

**Author:** ![Amxx](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/amxx/32/668_2.png) [@Amxx](https://forum.openzeppelin.com/u/Amxx)\
**Post date:** [December 30, 2021, 1:56pm UTC](https://forum.openzeppelin.com/t/source-openzeppelin-contracts-token-erc721-sol-not-found-file-import-callback-not-supported/21853/2 "2021-12-30T13:56:32Z")

</div>

Hello @revelationsz

Have you installed @openzeppelin/contracts using NPM? Is the error in vscode or when compiling with hardhat?

---

<div class="post-metadata">

**Author:** ![josephnaber](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/josephnaber/32/12323_2.png) [@josephnaber](https://forum.openzeppelin.com/u/josephnaber)\
**Post date:** [January 16, 2022, 2:45pm UTC](https://forum.openzeppelin.com/t/source-openzeppelin-contracts-token-erc721-sol-not-found-file-import-callback-not-supported/21853/3 "2022-01-16T14:45:08Z")

</div>

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

your path appears to be different from their documentation

---

<div class="post-metadata">

**Author:** ![Robbberto](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/robbberto/32/18831_2.png) [@Robbberto](https://forum.openzeppelin.com/u/Robbberto)\
**Post date:** [October 4, 2023, 9:44am UTC](https://forum.openzeppelin.com/t/source-openzeppelin-contracts-token-erc721-sol-not-found-file-import-callback-not-supported/21853/4 "2023-10-04T09:44:02Z")

</div>

I have a truffle project created with `truffle init`.  
I ran the `npm i @openzeppelin/contracts` command, I can see the contracts in the `node_modules` folder.

In my contract I have an import such as:  
`import "@openzeppelin/contracts/token/ERC721/ERC721.sol";`

but when I do `truffle compile`, I get:

```auto
ParserError: Source "@openzeppelin/contracts/token/ERC721/ERC721.sol" not found
 --> project:/contracts/BossNFT.sol:4:1:
  |
4 | import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; // NFT's standard
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

```

```auto
Truffle v5.11.5 (core: 5.11.5)
Node v18.18.0

```

I tried to close and reopen the project, to import everything locally. I am desperate.

---

<div class="post-metadata">

**Author:** ![Amxx](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/amxx/32/668_2.png) [@Amxx](https://forum.openzeppelin.com/u/Amxx)\
**Post date:** [October 5, 2023, 9:38am UTC](https://forum.openzeppelin.com/t/source-openzeppelin-contracts-token-erc721-sol-not-found-file-import-callback-not-supported/21853/5 "2023-10-05T09:38:51Z")

</div>

> [@Robbberto](#):
>
> In my contract I have an import such as:  
> `import "@openzeppelin/contracts/token/ERC721/ERC721.sol";`

This is correct. If you test that on remix it will work. I'm guessing the issue is with your truffle configuration.

---

<div class="post-metadata">

**Author:** ![Robbberto](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/robbberto/32/18831_2.png) [@Robbberto](https://forum.openzeppelin.com/u/Robbberto)\
**Post date:** [October 9, 2023, 12:57pm UTC](https://forum.openzeppelin.com/t/source-openzeppelin-contracts-token-erc721-sol-not-found-file-import-callback-not-supported/21853/6 "2023-10-09T12:57:38Z")

</div>

Hi @Amxx,

thanks for answering.

I kind of solved the issue by, literally, moving that import over the others. It doesn't have any sense, but I guess it's a truffle problem.
