Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Uncaught TypeError: Object(...) is not a function" on Import #286

Closed
joaoggnogueira opened this issue Feb 3, 2021 · 4 comments
Closed

Comments

@joaoggnogueira
Copy link

joaoggnogueira commented Feb 3, 2021

i'm following this example on Vue 3

import { library } from '@fortawesome/fontawesome-svg-core'
import { faUserSecret } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; //error here

library.add(faUserSecret);

Vue.config.productionTip = false
Vue.component('font-awesome-icon', FontAwesomeIcon)

The Vue is crashing, and cannot render anything

image

Also, i'm using the lastest version of vue-fontawesome dependencies

image

@joaoggnogueira joaoggnogueira changed the title Uncaught TypeError: Object(...) is not a function "Uncaught TypeError: Object(...) is not a function" on Import Feb 3, 2021
@thijstriemstra
Copy link

same issue here using:

"@fortawesome/fontawesome-svg-core": "^1.2.34",
"@fortawesome/free-brands-svg-icons": "^5.15.2",
"@fortawesome/vue-fontawesome": "^3.0.0-3",

@runxc1
Copy link

runxc1 commented Dec 20, 2021

It seems that there is a major issue with Vue-fontawesome and that it should not be used in a Vue3 project.

vuejs/core#4707

@robmadole
Copy link
Member

vuejs/core#4707 is not using the vue-fontawesome component. I've left a comment.

@robmadole
Copy link
Member

@joaoggnogueira @thijstriemstra if you can provide a reproducible example we'll be happy to take a look but we need more than a couple of code snippets and a screenshot. I'll re-open this ticket if either of you have time to provide that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants