---
title: "Comment by Charles Derek on \"3 quick ways to add fonts to your React app\" | Hashnode"
description: "I tried importing the exact way you mentioned to import into the index.js file, and still returns an error not found when the path matches. import &#x27;./asset"
url: "https://hashnode.com/posts/3-quick-ways-to-add-fonts-to-your-react-app/5ff83df9a538d00135153572/comment/625f597d9ad0ef10f07c0eae"
---

[Discussion](https://hashnode.com/posts/3-quick-ways-to-add-fonts-to-your-react-app/5ff83df9a538d00135153572)

Comment [3 quick ways to add fonts to your React app](https://hashnode.com/posts/3-quick-ways-to-add-fonts-to-your-react-app/5ff83df9a538d00135153572)

[Charles Derek](https://hashnode.com/@charlesderek)

[Apr 20, 2022](https://hashnode.com/posts/3-quick-ways-to-add-fonts-to-your-react-app/5ff83df9a538d00135153572/comment/625f597d9ad0ef10f07c0eae)

I tried importing the exact way you mentioned to import into the index.js file, and still returns an error not found when the path matches.

```
import './assets/fonts/AvenirNextLTPro-Regular.otf';
```

in /src/index.js

```
Module not found: Error: Can't resolve './assets/fonts/AvenirNextLTPro-regular.otf' in 'MyPathToTheProject/src'
```

[Tapas Adhikary](https://hashnode.com/@atapas)

[Apr 20, 2022](https://hashnode.com/posts/3-quick-ways-to-add-fonts-to-your-react-app/5ff83df9a538d00135153572/comment/625f597d9ad0ef10f07c0eae#reply-625f6c3c9ad0ef10f07c0f9e)

Hi Charles, it should work as long as the import is correct and the project infra supports the import keyword.

Did you check the GitHub project I mentioned above? That got all the examples including this one.
