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.

Nuxt 3 "generate" results in <font-awesome-icon /> to output whatever follows twice

See original GitHub issue

Describe the bug I am using this component with Nuxt 3 as described here and I’m seeing this weird behaviour. Say I have something like this

<a href="https://example.com"><font-awesome-icon icon="fa-brands fa-twitter" />Example</a>

if I run the dev server, everything is fine, but if I run generate and serve the output through a static HTTP server, I get “Example” printed twice. If I wrap the text in a tag, I get the tag and text twice (i.e. <span>Example</span><span>Example</span>). Weirdly enough, though, the generated HTML does not contain the repetition, so I suspect something weird is going on in the browser.

Reproducible test case https://andreafranceschini.org/files/afnuxt.tgz

Expected behavior A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • Happens on all browsers

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
Morpheu5commented, Aug 8, 2022

I found a workaround, which is to enclose the font-awesome-icon component in a dummy tag like a span, in that case I get no duplication (no visible duplication, at least).

1reaction
Reaper88commented, Dec 5, 2022

I am having the same issue and also gettings alot of logs like this from nuxt server side and also wrapping it doesn’t do any good to me.

Could not find one or more icon(s) { prefix: 'fas', iconName: 'server' } {} 
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does <font-awesome-icon /> output whatever follows ...
I found a workaround, which is to enclose the icon alone in something else, like a span tag.
Read more >
Issues · FortAwesome/vue-fontawesome - GitHub
Contribute to FortAwesome/vue-fontawesome development by creating an ... Nuxt 3 "generate" results in <font-awesome-icon /> to output whatever follows twice.
Read more >
Use Vue with... | Font Awesome Docs
Install @fortawesome/fontawesome-svg-core and any icon packages you plan to use. Then install the vue-fontawesome component: npm. # for Nuxt 2 ...
Read more >
[Solved]-Why is axios not using the settings in nuxt.config.js?
You need to use axios instance created by nuxt itself. ... does <font-awesome-icon /> output whatever follows twice when using Nuxt v3 static...
Read more >
[vue warn]: failed to resolve component: font-awesome-icon
You have to either create your Vue.component before the creation of the Vue ViewModel, ... Using FontAwesome in Nuxt 3 · Discussion #3823...
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