fontawesome 5 not working
See original GitHub issueChoose one: ๐ bug report
Unable to use fontawesome 5, as described in https://www.npmjs.com/package/@fortawesome/vue-fontawesome
๐ Configuration (.babelrc, package.json, cli command)
โฏ cat .babelrc
{
"presets": [
["env", { "modules": false }],
"stage-3"
]
}
โฏ cat package.json
{
"name": "client",
"description": "snip",
"version": "snip",
"author": "snip",
"license": "MIT",
"private": true,
"scripts": {
"dev": "parcel index.html",
"build": "parcel build index.html",
"clean": "rimraf .cache dist"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"devDependencies": {
"babel-preset-env": "^1.6.0",
"babel-preset-stage-3": "^6.24.1",
"cross-env": "^5.0.5",
"parcel-bundler": "parcel-bundler/parcel#vue",
"rimraf": "^2.6.2",
"tslint": "^5.9.1",
"typescript": "^2.7.1",
"vue": "^2.5.13",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"vuex-router-sync": "^5.0.0"
},
"dependencies": {
"@fortawesome/fontawesome": "^1.1.3",
"@fortawesome/vue-fontawesome": "^0.0.22",
"flexboxgrid": "^6.3.1",
"tachyons": "^4.9.1"
}
}
๐ค Expected Behavior
Should be able to use fontawesome
๐ฏ Current Behavior
The line
import FontAwesomeIcon from '@fortawesome/vue-fontawesome'
Throws an error
โฏ yarn dev
yarn run v1.3.2
$ parcel index.html
Server running at http://localhost:1234
๐จ Cannot find module '' from '/Users/sresu/code/client/src/components'
at /Users/sresu/code/client/node_modules/browser-resolve/node_modules/resolve/lib/async.js:46:17
at process (/Users/sresu/code/client/node_modules/browser-resolve/node_modules/resolve/lib/async.js:173:43)
at ondir (/Users/sresu/code/client/node_modules/browser-resolve/node_modules/resolve/lib/async.js:188:17)
at load (/Users/sresu/code/client/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
at onex (/Users/sresu/code/client/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
at /Users/sresu/code/client/node_modules/parcel-bundler/src/Bundler.js:329:13
at FSReqWrap.oncomplete (fs.js:152:21)
๐ Possible Solution
๐ฆ Context
๐ป Code Sample
๐ Your Environment
Software | Version(s) |
---|---|
Parcel | |
Node | 8.4.0 |
npm/Yarn | npm 5.6.0 / yarn 1.3.2 |
Operating System | macOS 10.12.6 |
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Font Awesome 5 icons not showing up - Stack Overflow
I use codeigniter and Font Awesome 5 I have download the latest version of font awesome 5 how ever for some reason my...
Read more >Troubleshooting | Font Awesome Docs
Typically this is due to a local network configuration issue or an issue with the ISP. Some of the steps to troubleshoot this:...
Read more >[Solved]: Font Awesome icons not showing on my website
How to fix Font Awesome version related issues ... Check and confirm the Font Awesome version used on your website. To do so,...
Read more >Font Awesome 5 Icons not Showing? - Slick Media
2. Check you are calling the correct Font Awesome CSS and that you have the required privileges ยท 3. Make sure your Unicode...
Read more >Problems with "all.css" and "font-family: 'Font Awesome\ 5 ...
I've fixed display issues by adding this to my css when I am using any of the FA icons that are solid. .fas...
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 Free
Top 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
Not working on this codebase right now, but looks ok to me. Thanks !
@jbrodriguez I donโt think that is a bug. If you put in the icon as string, then the default prefix is
fas
https://github.com/FortAwesome/vue-fontawesome/blob/master/src/components/FontAwesomeIcon.js#L20Please also make sure your import is correct, you are missing an
s
in the end:If you
console.log(faGithub)
, you can see that the prefix isfab
. So either you write following (which might be more appropriate if you add your icons in one exact point):or you can use the object, where all the necessary information exist right away:
@DeMoorJasper I think this can be closed.