Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fail when sourceMap is enabled and source files contains embedded sourcemap #178

Open
felicienfrancois opened this issue Feb 17, 2015 · 6 comments

Comments

@felicienfrancois
Copy link

At the end of one of my source files:

...
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uI.....jc3MifQ== */

When activating sourceMap = true, I get the following error:

Running "cssmin:dev" (cssmin) task
>> Error: ENOENT, no such file or directory 'myproject/data:application/json;base64,eyJ2ZXJzaW9uI.....jc3MifQ
Warning: CSS minification failed Use --force to continue.

Aborted due to warnings.

To reproduce, just try to minify the following file with option sourceMap = true
https://github.com/l-lin/font-awesome-animation/blob/master/dist/font-awesome-animation.css

@arthurvr
Copy link

I just tested and at the moment I am unable to reproduce this. What version of the task are you using?

@felicienfrancois
Copy link
Author

I'm able to reproduce it with the following setup:

  • grunt-contrib-cssmin v0.12.2
  • grunt-cli v0.1.13
  • grunt v0.4.5
  • iojs v1.4.3
  • windows 8.1 64bit

source file: font-awesome-animation v0.0.6 installed with bower

Grunfile.js:

...
cssmin: {
  test: {
    options: {
      sourceMap: true
    },
    files: {
      'output.css': ["bower_components/font-awesome-animation/dist/font-awesome-animation.css"]
    }
  }
},
...

Command: grunt cssmin:test

@benoitemile
Copy link

+1, i'm reproducing the same error

  • grunt-contrib-cssmin 0.12.2
  • grunt 0.4.5
  • mac os 10.10.2

@trkoch
Copy link

trkoch commented Feb 23, 2017

I'm experiencing a similar, possibly related error.

>> Error: Invalid mapping: {"generated":{"line":1,"column":7296},"source":"../../Private/Stylesheets/bootstrap/mixins/_clearfix.scss","original":{"line":14,"column":-10},"name":null}

It used to work with

I have no idea why grunt was downgraded (no changes in package.json)

{
  // ...
  "grunt": "^1.0.1",
  // ...
}

Please let me know if the full list of packages (npm list) can be of help.

@trkoch
Copy link

trkoch commented Feb 23, 2017

Works with [email protected].

@carsonreinke
Copy link

This is still an issue with a source map generated from SaSS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants