johnpapa / generator-hottowel

Yo generator that creates an Angular app via HotTowel
835 stars 230 forks source link

gulp serve-build error #92

Closed ackzell closed 8 years ago

ackzell commented 9 years ago

I'm runing Ubuntu 14.10 64Bits. Node.js version is 0.12.2 and NPM version is 2.7.4.

I can't figure out this one, after running either gulp serve-build or just gulp build I get this error:

**PATH-TO-MY-PROJECT**/node_modules/gulp-jscs/index.js:99
            this.emit('error', new gutil.PluginError('gulp-jscs', out.join('\n\n'), {
                                                                      ^
RangeError: Invalid string length
    at Array.join (native)
    at DestroyableTransform._flush (**PATH-TO-MY-PROJECT**/node_modules/gulp-jscs/index.js:99:62)
    at DestroyableTransform.<anonymous> (**PATH-TO-MY-PROJECT**/node_modules/gulp-jscs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:135:12)
    at DestroyableTransform.g (events.js:199:16)
    at DestroyableTransform.emit (events.js:129:20)
    at finishMaybe (**PATH-TO-MY-PROJECT**/node_modules/gulp-jscs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:371:12)
    at endWritable (**PATH-TO-MY-PROJECT**/node_modules/gulp-jscs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:378:3)
    at DestroyableTransform.Writable.end (**PATH-TO-MY-PROJECT**/node_modules/gulp-jscs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:356:5)
    at DestroyableTransform.onend (**PATH-TO-MY-PROJECT**/node_modules/gulp-jshint/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:523:10)
    at DestroyableTransform.g (events.js:199:16)

I have a JSCS plugin for Sublime Text 3 and I can't find any error in the style. Could anyone give me a hand please?

johnpapa commented 9 years ago

not sure. try searching gulp jscs and ubunto for that error

ackzell commented 9 years ago

Thank you @johnpapa,

For hottowel and for the response as well :)

For now I modified the gulp-jscs index.js file and wrapped that line into a try/catch statement. This way the execution doesn't break.

  , function (cb) {

        if (out.length > 0) {
            try {
                console.log('out is: ', out[1]);
                this.emit('error', new gutil.PluginError('gulp-jscs', out.join('\n\n'), {
                    showStack: false
                }));
            } catch (e) {
                console.log('exception: ', e);
            }
        }

        cb();
    })
johnpapa commented 9 years ago

create an issue with them and maybe a PR