Git Product home page Git Product logo

Comments (12)

lukeapage avatar lukeapage commented on June 24, 2024

Sorry, no ideas!
Possibly something to do with sourcemaps? if you take that out and leave the plugin in, does it work?

from less-plugin-clean-css.

Kruegs avatar Kruegs commented on June 24, 2024

I'm experiencing the same error in Windows. If either sourcemaps or clean-css is removed, then it works. Also, in the Less I've place a multi-line comment at the top. If this comment is removed or changed to be a single line comment, then everything works.

/*
Test
*/
.test {color:red;}

Here is a simple gist with the code I'm using:
https://gist.github.com/Kruegs/3b4b720f9fe36f1d6532

from less-plugin-clean-css.

jakubpawlowicz avatar jakubpawlowicz commented on June 24, 2024

Does this help anyhow, guys? clean-css/clean-css#593 (comment)

from less-plugin-clean-css.

seven-phases-max avatar seven-phases-max commented on June 24, 2024

@jakubpawlowicz There's exactly the same problem with less-plugin-autoprefix (see the referenced issue above). So aparently it's some weird incompatibility in how gulp-less and these plugins handle sourcemaps but it's hard to say for sure w/o deeper tests/debugging (unfortunately it looks like neither @lukeapage nor me actually use gulp so it may take for a while until we'll get to this to investigate... Unless someone else would be so kind to take it. :)

from less-plugin-clean-css.

lukeapage avatar lukeapage commented on June 24, 2024

I use gulp in some projects with less-plugin-clean-css and autoprefix on windows, and haven't had any problems. then again I haven't switched on sourcemaps either as they don't need it yet.

I suspect the problem is that gulp uses streams - which should be fine since the gulp-plugin can wrap less and use it like an asynchronous stream. I've reviewed this plugin and less.js and I can't see anywhere that less-node write the sourcemap - its only done by lessc, so that means it's either gulp, gulp-less, clean-css or the sourcemaps code.

Someone who gets the error needs to debug, but it doesn't look to me like less is doing anything incompatible.

from less-plugin-clean-css.

lukeapage avatar lukeapage commented on June 24, 2024

for the interested, clean-css/clean-css#593 has part of an analysis, @jakubpawlowicz will investigate next

from less-plugin-clean-css.

pgrm avatar pgrm commented on June 24, 2024

Same error here, removing the less plugins or sourcemaps makes it work again.

For now, I'm enabling one or the other depending if it's for debug or release

from less-plugin-clean-css.

amcdnl avatar amcdnl commented on June 24, 2024

Getting similar issue on windows only. any updates?

from less-plugin-clean-css.

matthew-dean avatar matthew-dean commented on June 24, 2024

@seven-phases-max I have some knowledge of gulp, although like everyone else here, I'm limited on time.

I wonder what it would take for Less to simply be Gulp-compatible, which would eliminate the need for gulp-less and alleviate some of the back and forth of an issue like this.

from less-plugin-clean-css.

lukeapage avatar lukeapage commented on June 24, 2024

to be clear, this is a clean css issue and needs ti be investigated and fixed there. see the linked issue above.

from less-plugin-clean-css.

matthew-dean avatar matthew-dean commented on June 24, 2024

Ah.

from less-plugin-clean-css.

mgol avatar mgol commented on June 24, 2024

I'm seeing it without gulp-clean-css, just using gulp-sourcemaps together with gulp-less is enough.

from less-plugin-clean-css.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.