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.

Invalid UTF-8 in Sass generated file

See original GitHub issue

After installing with yarn add highlight.js and trying to import the Sass file for the dracula theme with this:

@import '~highlight.js/scss/dracula.scss'

I get this error:

SassError: Invalid UTF-8.
   ╷
12 │ @author �verton Ribeiro <nuxlli@gmail.com>
   │         ^
   ╵
  node_modules/highlight.js/scss/dracula.scss 12:9  @import

Looking at the CSS files, it looks like the character that should be there is an: É.

So the full line should read:

@author Éverton Ribeiro <nuxlli@gmail.com>

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
marcoscacerescommented, Sep 7, 2019

Ok, I think this was the bug https://github.com/highlightjs/highlight.js/pull/2120 … the treating the files as binary.

0reactions
lobo-tuertocommented, Sep 7, 2019

Thanks for looking into this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error "Invalid UTF-8" when compiling sass with @import
I think you have a UNIX unsupported letter in your folder path ? Try removing it. I removed this error by removing the...
Read more >
node-sass / Tickets / #2281 Error "Invalid UTF-8 sequence ...
Is important to note that this error only happens when the file is encoded as ANSI (Windows-1252). When the file is encoded as...
Read more >
[Sass] How to let Sass permanently output UTF-8 CSS files on ...
Just put '@charset "utf-8";' at the beginning of every file that includes UTF-8 characters and Sass will know that those files are UTF-8...
Read more >
Sass Guidelines
An opinionated styleguide for writing sane, maintainable and scalable Sass.
Read more >
sass-loader - webpack - JS.ORG
Loads a Sass/SCSS file and compiles it to CSS. ... If you pass the generated CSS on to the css-loader , all urls...
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