-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Error: ENOENT with lessc & plugin-autoprefix & plugin-clean-css #2612
Comments
As crazy as this may sound, try swapping the order of the autoprefix and clean-css plugins on the lessc command line. That is, put clean-css first and autoprefix second. That solved it for me. |
Are they actually working, or "it just compiles" w/o a error? AFAIR one of these plugins ( |
You are right. Although it compiled, the line numbers in the source-map were all messed up. They were messed up for clean-css+autoprefix, clean-css only, and autoprefix only. So it appears these plugins cannot be used in conjunction with source mappings period, which is pretty sad. I briefly looked into using postcss for autoprefix support, but it didn't look like that would work with less source mappings either. If anyone has figured out a way to use autoprefix in conjunction with less source mappings, please share. If not, it may be time for me to ditch less, because I'm tired of using lesshat for prefixing. |
A usual recommendation I assume would be "do not use |
I am actually using grunt and grunt-contrib-less and still having this issue. As far as I can tell, grunt-contrib-less is just a fairly thin wrapper around less. |
In my mind, the "post-processing plugins" of Less should be deprecated, because the purpose of Less is not a task runner, and AFAIK it doesn't properly translate source maps through each step. Even if you're using Grunt or Gulp, it looks like you're using Less plugins vs Grunt plugins that iterate through various tasks. I've had no problem using Gulp with the "gulp-sourcemaps" plugin, and running a series of pipes after Less that include autoprefixing and minification. When this was proposed for Less, Grunt was fairly new, and I'm not sure if Gulp was a thing or not. I think at this point, just don't use Less post-processing plugins (IMHO). (Note, there are other types of plugins coming to Less with much greater value.) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm trying to get my less autoprefixed and minified, with sourcemaps, but I'm getting the error:
Error: ENOENT: no such file or directory, open '/path/style.css.map'
. (Full error below)Am I missing something simple? I can get a working sourcemap with autoprefixer, or with clean-css, or with neither, but never with both..
Here are the npm scripts I'm using:
The stylesheet:
And the directory structure:
full error:
Let me know if I can provide further info, TIA, Tim
The text was updated successfully, but these errors were encountered: