segmentio / myth

A CSS preprocessor that acts like a polyfill for future versions of the spec.
4.32k stars 131 forks source link

Cannot track error properly. #91

Closed vladikoff closed 10 years ago

vladikoff commented 10 years ago

Running

 myth main.css some.css

Outputs:

$ myth main.css some.css

       error · RangeError: Maximum call stack size exceeded

/Users/vfilippov/npmlocal/lib/node_modules/myth/bin/logger.js:44
    err.stack.split('\n').slice(1).forEach(function(line){
              ^
TypeError: Cannot call method 'split' of undefined
    at Object.exports.throw (/Users/vfilippov/npmlocal/lib/node_modules/myth/bin/logger.js:44:15)
    at /Users/vfilippov/npmlocal/lib/node_modules/myth/bin/myth:92:19
    at ReadStream.onEnd (/Users/vfilippov/npmlocal/lib/node_modules/myth/node_modules/read-file-stdin/node_modules/stream-to-array/index.js:38:5)
    at ReadStream.g (events.js:180:16)
    at ReadStream.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:919:16
    at process._tickCallback (node.js:419:13)
MoOx commented 10 years ago

Can you share your file(s) somewhere ? Or maybe try with latest version (current master) ?

miketaylr commented 10 years ago

Hi! Our grunt file is at https://github.com/webcompat/webcompat.com/, you should be able to just clone and npm install && grunt to reproduce. I'm wondering if this isn't somehow related to having different versions of autoprefixer (as a standalone dep and as a myth dep)? cc @magsout

miketaylr commented 10 years ago

So this is weird (to me), https://github.com/webcompat/webcompat.com/commit/3fbcaf7567b04529b6f1e6efd18ce46bc3718e3a fixed the issue. However, myth seems to be producing invalid CSS which causes other grunt tasks to explode. See https://github.com/webcompat/webcompat.com/issues/168#issuecomment-48831451.

MoOx commented 10 years ago

I successfully reproduce this error with 1.0.4

  21 passing (2s)
  2 failing

  1) features should add vars support:
     Maximum call stack size exceeded

  2) browser should add vars support:
     Maximum call stack size exceeded

make: *** [test] Error 2

That being said, I cannot reproduce it with current version. So closing since 1.1.0 is out. @miketaylr for the other issue you got, it has already been fixed too. Please checkout latest version.

miketaylr commented 10 years ago

Thanks @MoOx! Confirmed fixed on 1.1.0.

magsout commented 10 years ago

:+1: