question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing d.ts file for Vue - fortawesome

See original GitHub issue

This 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:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
pingustarcommented, Dec 4, 2018

@robmadole what’s the status for TS support? Thanks!

0reactions
jasonlundiencommented, Nov 3, 2022

Closing this issue. Both our Vue 2 and Vue 3 components support TS with our Docs show how to import and add icons.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found