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

Returning Error with No Details #121

Closed
mudetroit opened this issue Jan 13, 2015 · 7 comments
Closed

Returning Error with No Details #121

mudetroit opened this issue Jan 13, 2015 · 7 comments

Comments

@mudetroit
Copy link

I am getting an error out of gulp-less, but as you can see I am not receiving any details from it, making it difficult for me to pinpoint what the issue is..

[11:57:04] Starting 'styles'...
[11:57:06] Plumber found unhandled error:
 Error in plugin 'gulp-less'
Message:
    First argument needs to be a number, array or string. in file undefined line no. undefined
Details:
    lineNumber: undefined
    fileName: undefined
[11:57:07] Finished 'styles' after 3.02 s
[11:57:07] Starting 'watch'...
[11:57:07] Finished 'watch' after 155 ms
[11:57:07] Starting 'clientBuild'...
[11:57:07] Finished 'clientBuild' after 5.1 μs

Here is the styles task that runs gul less, it is coffeescript, but should be legible.

gulp = require 'gulp'
{less, sourcemaps, plumber} = require('gulp-load-plugins')()

gulp.task 'styles', ->
    gulp.src(['./public/include/less/**/*.less', '!./**/_*.less'])
    .pipe plumber()
    .pipe sourcemaps.init()
    .pipe less({verbose: true})
    .pipe sourcemaps.write()
    .pipe gulp.dest('./public/include/css')

When I remove sourcemaps from the equation the error goes away. I am not certain if it is being generated by gulp-less or gulp-sourcemaps, but something in the interaction of the two is causing an odd error. I will cross post this on gulp-sourcemaps as well.

gulp-sourcemaps/gulp-sourcemaps#78

@stephenlacy
Copy link
Contributor

Please create a test repo to reproduce this bug

@yocontra
Copy link
Member

Hmm weird... it's possible that those attributes on the error coming out of less have some magic logic on them, maybe they are getters pointing to the sourcemap which gulp-sourcemap is modifying.

@luin
Copy link

luin commented Jan 14, 2015

same issue here

@aliai
Copy link

aliai commented Jan 21, 2015

I ran into the same problem. I started debugging and found out that the bug resides in less module (specifically when it tries to create a base64 format for an undefined input).

In my case, I have a variables.less file that always ends up as an empty variables.css file that could not be handled by the sourcemap. So I just exclude it from the stream and everything went alright. I see you are excluding _*.less files but maybe you have another empty file somewhere.

@HaNdTriX
Copy link
Contributor

#122

@OJezu
Copy link

OJezu commented Feb 2, 2015

Related (I hope): less/less.js#2430
EDIT: duh, it autolinked above. Oh, well.

@yocontra
Copy link
Member

fixed in 2.0.3

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

7 participants