typefaces icon indicating copy to clipboard operation
typefaces copied to clipboard

Can't resolve 'typeface-monserrat' in create-react-app

Open capndave opened this issue 5 years ago • 1 comments

Just opened a new create-react-app and ran npm install typeface-monserrat. I added require('typeface-monserrat') to index.js. I get the following error:

Module not found: Can't resolve 'typeface-monserrat' in '/home/myUserName/Documents/myApp/src'

I also tried requiring typeface-monserrat in App.js, with similar results. What am I doing wrong?

Thanks in advance!

capndave avatar Feb 06 '20 17:02 capndave

You do know that the font is called montserrat and therefore the typo in both npm and require should be fixed.

codegrau avatar Feb 21 '20 20:02 codegrau