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.

SASS Source-Map Error

See original GitHub issue

When running PostCSS with the autoprefixer plugin on a CSS file that was compiled from SASS using the “sass” npm package, I get the following error:

> testsitecom@1.0.0 css-prefix /var/www/testsitecom
> postcss httpdocs/css/main.css --use autoprefixer -b 'last 2 versions' -r

Error: Unsupported source map encoding charset=utf-8

Here’s the start of the source-map line it struggles with:

/*# sourceMappingURL=data:application/json;charset=utf-8...

Here’s the “scripts” block of my package.json:

"css-compile": "sass --embed-source-map httpdocs/scss/main.scss:httpdocs/css/main.css",
"css-prefix": "postcss httpdocs/css/main.css --use autoprefixer -b 'last 2 versions' -r",
"css-minify": "postcss httpdocs/css/main.css --use cssnano -o httpdocs/css/main.min.css",
"css": "npm-run-all css-compile css-prefix css-minify"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
aicommented, Mar 16, 2020

@notlee we are now collecting funds to buy a working time and release ose (we need this time to write good migration docs, rewrite plugins, made few extra refactorings).

If your company uses PostCSS you can talk to your manager about funding us. https://opencollective.com/postcss/

Or you can help us with a retweet https://twitter.com/PostCSS/status/1227280750506057728

0reactions
notleecommented, Mar 16, 2020

hey @ai, I ran into the same issue using inline source maps from dart-sass. I see @Melluish’s contribution was merged into the ose branch last year. I was wondering what this branch is and if it will be released? Thanks for your work on postcss 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sourcemap wrong lines - webpack · Issue #2684 · sass/node ...
It looks like that sass-loader is generating a sourcemap which point out wrong lines. I am not sure if it is a bug...
Read more >
SASS Source Map pointing to the wrong SASS file
Try using gulp-sass and gulp-sourcemaps package with below gulpfile.js to render the sass file with source-map var gulp = require('gulp'); ...
Read more >
Dart Sass Command-Line Interface
This flag tells Sass whether to emit a CSS file when an error occurs during ... If the --no-source-map flag is passed, Sass...
Read more >
Sass Source Maps not working in Dev Tools - Bugzilla@Mozilla
When I try this I see this in the console: Source map error: TypeError: NetworkError when attempting to fetch resource. Resource URL: https://evision.aub.ac.uk/ ......
Read more >
900923 - DevTools failed to parse SourceMap for css files ...
Steps to reproduce the problem: 1. Compile a SASS file with WebCompiler, include CSS is webpage 2. Load page with Chromium 3. Open...
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