Closed DevLaka closed 5 months ago
Add "moduleResoluction": "bundler" within the compilerOptions object in the tsconfig.json file like below.
{
"compilerOptions": {
"moduleResolution": "bundler"
},
}
It's disappointing that this isn't mentioned in any Font Awesome documentation.
We'll get it added. Thanks for letting us know how you solved it.
https://docs.fontawesome.com/web/use-with/react/use-with#typescript would be a great place for this
Bug description
I'm currently working on a React TypeScript project where I initially used Font Awesome free icons. However, I've realized the need to improve the aesthetics by incorporating Font Awesome Pro icons. Transitioning to Font Awesome Pro might not be as straightforward as I initially thought.
I've set up Font Awesome Pro following the documentation provided here: Font Awesome Docs
Here are the steps I followed:
Created a Kit Package:
Created a .npmrc file in the folder where package.json exists. .nmprc File Contents:
Installed below packages.
Attempted to import icons to a React component using the following code:
However, I'm encountering an error stating: "Module '@awesome.me/kit-code/icons/classic/solid/' or its corresponding type declarations cannot be found.
Also, I noticed that the index.d.ts file in the @awesome.me node module exports an empty object.
Font Awesome version
v6
Serving
Kit
Implementation
SVG+JS
Browser and Operating System