Missing d.ts file for Vue - fortawesome
See original GitHub issueThis started here but was suggested by @robmadole to create an issue.
Hello,
So I have a Vue page that is working. Now I am trying to add my Font Awesome Pro icons to it and following your directions. The top of my pages .ts file looks like this.
import fontawesome from "@fortawesome/fontawesome";
import FontAwesomeIcon from "@fortawesome/vue-fontawesome";
import { faCoffee } from "@fortawesome/fontawesome-pro-regular";
import regular from "@fortawesome/fontawesome-pro-regular";
However, in Visual Studio 2017, I am getting an error on the vue-fontawesome line. Specifically:
TS7016 TypeScript (TS) Could not find a declaration file for module. implicitly has an ‘any’ type. Try npm install @types/fortawesome__vue-fontawesome
if it exists or add a new declaration (.d.ts) file containing declare module;
Seems like each of the above folders actually have an index.d.ts file except for the vue-fontawesome folder. Should there be one? If not, how do I get around this error.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Could not find a declaration file for module 'module-name ...
In order for this to work, I had to make declare module '...' the first line of code in the module.d.ts file, and...
Read more >I can't import some Libraries in main.ts(TypeScript) in Vue3.js ...
Well, this is generally because you are missing type declaration files ( .d.ts ) for your libraries. Either you create a file or...
Read more >@fortawesome/fontawesome-svg-core - npm
Start using @fortawesome/fontawesome-svg-core in your project by running ... TypeScript icon, indicating that this package has built-in type ...
Read more >vue-fontawesome - JavaScript
Font Awesome 5 Vue component using SVG with JS ... We have individual icon files like node_modules/@fortawesome/free-solid-svg-icons/faCoffee.js that ...
Read more >Use Package Managers | Font Awesome Docs
If you'd prefer a per-project setting (great for teams and CI/CD), create a .npmrc file in the root of your project (or where...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@robmadole what’s the status for TS support? Thanks!
Closing this issue. Both our Vue 2 and Vue 3 components support TS with our Docs show how to import and add icons.