Giter VIP home page Giter VIP logo

Comments (17)

mkoe-unitb avatar mkoe-unitb commented on June 2, 2024 4

I think the build is broken.

For me everything was working after I created a new component FontAwesomeIcon.vue with this content:

<script>
import FontAwesomeIcon from '@fortawesome/vue-fontawesome/src/components/FontAwesomeIcon'
export default FontAwesomeIcon;
</script>

and installed the required "humps" dependency.

from vue-fontawesome.

sexnine avatar sexnine commented on June 2, 2024 3

This only began happening after Nuxt 3.1

I'm also having this issue. As a temporary fix I've wrapped the icon with <client-only></client-only>.

from vue-fontawesome.

Luffyyy avatar Luffyyy commented on June 2, 2024 2

I can confirm this is happening on latest build of Nuxt 3 (edge)
image
Replacing the font-awesome-icon component seems to make the problem disappear. This only began happening after Nuxt 3.1

from vue-fontawesome.

jamescmacey avatar jamescmacey commented on June 2, 2024 1

I'm experiencing the same issue in Nuxt 3.4 (and was also experiencing it before I upgraded from Nuxt 3.0.0-rc4).

It seems to only occur when the FontAwesomeIcon is placed inside of an <a>, <NuxtLink> or <RouterLink> tag. While this is happening, I receive plenty of the following messages in the server log:

Could not find one or more icon(s) { prefix: 'fas', iconName: 'external-link-alt' } {}
Could not find one or more icon(s) { prefix: 'fas', iconName: 'check' } {}    

Despite these warnings, the icon does generate correctly on the client side.

The solution by @mkoe-unitb is working as a fix for me (for both the duplication and all the related warning messages)

from vue-fontawesome.

Trevor-143 avatar Trevor-143 commented on June 2, 2024 1

I had the same issue and what worked for me is i wrapped the icon on its own div

from vue-fontawesome.

thibault60000 avatar thibault60000 commented on June 2, 2024

I can confirm this is happening on latest build of Nuxt 3 (edge) image Replacing the font-awesome-icon component seems to make the problem disappear. This only began happening after Nuxt 3.1

Thanks for anwser
I don't understand, what is the best solution to solve my issue ? πŸ˜”

from vue-fontawesome.

thibault60000 avatar thibault60000 commented on June 2, 2024

It's my dependencies

Capture d’écran 2023-01-25 aΜ€ 17 08 42

from vue-fontawesome.

Luffyyy avatar Luffyyy commented on June 2, 2024

I can confirm this is happening on latest build of Nuxt 3 (edge) image Replacing the font-awesome-icon component seems to make the problem disappear. This only began happening after Nuxt 3.1

Thanks for anwser
I don't understand, what is the best solution to solve my issue ? πŸ˜”

Meant that replacing the component "fixes" the issue, but obviously disables font awesome.

from vue-fontawesome.

thibault60000 avatar thibault60000 commented on June 2, 2024

I can confirm this is happening on latest build of Nuxt 3 (edge) image Replacing the font-awesome-icon component seems to make the problem disappear. This only began happening after Nuxt 3.1

Thanks for anwser
I don't understand, what is the best solution to solve my issue ? πŸ˜”

Meant that replacing the component "fixes" the issue, but obviously disables font awesome.

Use <i class="fad fa-dove" /> instead fix the issue.. :/

from vue-fontawesome.

ItzExotical avatar ItzExotical commented on June 2, 2024

Same issue. Any updates on when this will be fixed in the package? Quite annoying.
image

from vue-fontawesome.

sexnine avatar sexnine commented on June 2, 2024

Hey all, I've been using antfu's unplugin-icons library which supports fontawesome icons.
It has worked flawlessly for me with SSR without the need for <client-only></client-only>.

Until this issue is fixed, using unplugin-icons works super well (and honestly don't know whether I'll ever go back to vue-fontawesome).

from vue-fontawesome.

Luffyyy avatar Luffyyy commented on June 2, 2024

I started using https://github.com/nuxt-modules/icon kinda embarrassing that a paid product pays no attention to simple issues like this. I'll probably not use it again.

from vue-fontawesome.

christine927t avatar christine927t commented on June 2, 2024

I think the build is broken.

For me everything was working after I created a new component FontAwesomeIcon.vue with this content:

<script>
import FontAwesomeIcon from '@fortawesome/vue-fontawesome/src/components/FontAwesomeIcon'
export default FontAwesomeIcon;
</script>

and installed the required "humps" dependency.

Thank you, this fixed the Hydration mismatch error and the "Could not find one or more icons..." console error.

"dependencies": {
  "@fortawesome/fontawesome-pro": "^6.4.0",
  "@fortawesome/fontawesome-svg-core": "^6.4.0",
  "@fortawesome/free-regular-svg-icons": "^6.4.0",
  "@fortawesome/free-solid-svg-icons": "^6.4.0",
  "@fortawesome/pro-regular-svg-icons": "^6.4.0",
  "@fortawesome/vue-fontawesome": "^3.0.3",
  "humps": "^2.0.1",
  "vue": "^3.2.47"
},
"devDependencies": {
  "nuxt": "^3.4.2",
  "vite": "^4.1.4"
}

from vue-fontawesome.

Aurion72 avatar Aurion72 commented on June 2, 2024

@jasonlundien Anything new on this issue ?

from vue-fontawesome.

codeofsumit avatar codeofsumit commented on June 2, 2024

I can confirm that the fix of creating a new component + installing humps works to remove the hydration warning.

Hopefully, this will be fixed in the corresponding libraries (nuxt or fontawesome)

from vue-fontawesome.

Trevor-143 avatar Trevor-143 commented on June 2, 2024

this is what worked <li> <div><font-awesome-icon :icon="['fas', 'circle-check']" /></div>Must have license</li>

from vue-fontawesome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.