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.

Using font awesome

See original GitHub issue

I’ve upgraded to 0.2.0 which I think was supposed to fix this.

Importing bootstrap works just fine.

# index.js
import 'font-awesome/css/font-awesome.css'
Compiling...                                                                                                                                                                                           [0/0]
Failed to compile.

Error in ./~/font-awesome/fonts/fontawesome-webfont.eot?v=4.6.3
Module parse failed: /Users/spencer/code/day-by-day-webapp/node_modules/font-awesome/fonts/fontawesome-webfont.eot?v=4.6.3 Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '�' (1:0)
 @ ./~/react-scripts/~/css-loader!./~/react-scripts/~/postcss-loader!./~/font-awesome/css/font-awesome.min.css 6:243-294

Error in ./~/font-awesome/fonts/fontawesome-webfont.woff2?v=4.6.3
Module parse failed: /Users/spencer/code/day-by-day-webapp/node_modules/font-awesome/fonts/fontawesome-webfont.woff2?v=4.6.3 Unexpected character '' (1:4)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '' (1:4)
 @ ./~/react-scripts/~/css-loader!./~/react-scripts/~/postcss-loader!./~/font-awesome/css/font-awesome.min.css 6:412-465

Error in ./~/font-awesome/fonts/fontawesome-webfont.woff?v=4.6.3
Module parse failed: /Users/spencer/code/day-by-day-webapp/node_modules/font-awesome/fonts/fontawesome-webfont.woff?v=4.6.3 Unexpected character '' (1:4)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '' (1:4)
 @ ./~/react-scripts/~/css-loader!./~/react-scripts/~/postcss-loader!./~/font-awesome/css/font-awesome.min.css 6:495-547

Error in ./~/font-awesome/fonts/fontawesome-webfont.ttf?v=4.6.3
Module parse failed: /Users/spencer/code/day-by-day-webapp/node_modules/font-awesome/fonts/fontawesome-webfont.ttf?v=4.6.3 Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '' (1:0)
 @ ./~/react-scripts/~/css-loader!./~/react-scripts/~/postcss-loader!./~/font-awesome/css/font-awesome.min.css 6:576-627

Error in ./~/font-awesome/fonts/fontawesome-webfont.svg?v=4.6.3
Module parse failed: /Users/spencer/code/day-by-day-webapp/node_modules/font-awesome/fonts/fontawesome-webfont.svg?v=4.6.3 Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (1:0)
 @ ./~/react-scripts/~/css-loader!./~/react-scripts/~/postcss-loader!./~/font-awesome/css/font-awesome.min.css 6:660-711

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
insincommented, Jul 30, 2016

Fix: the loaders for font resources need a (\?v=\d+\.\d+\.\d+)? on the end of their RegExps.

1reaction
neelendu25commented, Sep 12, 2017

I am very new to react in fact front end … can you please help me with loader syntax to include (?v=\d+.\d+.\d+)? in loaders module: { loaders: [ { test: /.js$/, loaders: [‘babel’], exclude: /node_modules/ } ] } }

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Add Icons | Font Awesome Docs
We recommend using <i> element with the Font Awesome CSS classes for the style class for the style of icon you want to...
Read more >
Font Awesome Intro - W3Schools
You place Font Awesome icons by using the prefix fa and the icon's name. Example. The following code: <!DOCTYPE html> <html>
Read more >
How to use font awesome icons in 2020 - YouTube
How to use font awesome icons in 2020 | Introduction to HTML5 and CSS3 | HTML5 and CSS3 in 2020.
Read more >
How to Add Font Awesome Icons in HTML - YouTube
In this video tutorial, you will learn how to add font awesome icon set to your web project. A basic demostration is also...
Read more >
How To Use Font Awesome 5 with React - DigitalOcean
Step 1 — Using Font Awesome · Step 2 — Choosing Icons · Step 3 — Installing Font Awesome · Step 4 —...
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 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