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.

ERROR in ./~/babel-loader!./~/svg-react-loader!./ui/images/affirm-logo.svg
Module build failed: Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: m
    at error (/Users/chetcorcos/code/styleguide/node_modules/svg-react-loader/node_modules/xml2js/node_modules/sax/lib/sax.js:652:8)
    at strictFail (/Users/chetcorcos/code/styleguide/node_modules/svg-react-loader/node_modules/xml2js/node_modules/sax/lib/sax.js:675:22)
    at Object.write (/Users/chetcorcos/code/styleguide/node_modules/svg-react-loader/node_modules/xml2js/node_modules/sax/lib/sax.js:955:11)
    at Parser.exports.Parser.Parser.parseString (/Users/chetcorcos/code/styleguide/node_modules/svg-react-loader/node_modules/xml2js/lib/xml2js.js:481:31)
    at Parser.parseString (/Users/chetcorcos/code/styleguide/node_modules/svg-react-loader/node_modules/xml2js/lib/xml2js.js:7:59)
    at Object.module.exports (/Users/chetcorcos/code/styleguide/node_modules/svg-react-loader/index.js:45:15)
 @ ./checkout/main.js 50:17-65

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
hunthunthuntcommented, Aug 23, 2016

The -! prefix worked for me also, for anyone looking for ES6/2015 syntax, try:

import MyIcom from '-!babel!svg-react!assets/images/fooIcon.svg?name=MyIcon';

8reactions
ccorcoscommented, Oct 7, 2015

crap. I meant to close this. It was a problem with the way I was loading it. you need to prefix require("-!... when you’re overriding other loaders…

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the difference between UTF-8 and UTF-8 with BOM?
The UTF-8 BOM is a sequence of bytes at the start of a text stream ( 0xEF ... There are at least three...
Read more >
Headaches of UTF-8 BOM! - Pluralsight
UTF 8 BOM (or Byte Order Mark) can throw a wrench into any Rest API and cause nothing but headaches. Learn how to...
Read more >
Files encoded with UTF-8 BOM are (still) not supported #500
Files encoded with UTF-8 with BOM (e.g. CSV files saved by Excel) are not correctly read: The BOM character is not being discarded....
Read more >
UTF-8 BOM and SEO: How to find, clean, and fix an invisible ...
How to fix UTF-8 BOM in your robots.txt file: Fixing the issue is pretty easy. I recommend using a text editor like Textpad...
Read more >
Byte order mark - Wikipedia
BOM use is optional. Its presence interferes with the use of UTF-8 by software that does not expect non-ASCII bytes at the start...
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