lazd / gulp-karma

Karma plugin for gulp
MIT License
75 stars 36 forks source link

"spawn ENAMETOOLONG" Error in Windows with many test files #38

Closed ArneHB closed 9 years ago

ArneHB commented 9 years ago

We're using gulp-karma package and now we're starting to get plenty of test files in our project. We've started getting the error "spawn ENAMETOOLONG" which probably can be related to limits with Windows. The error goes away if we move to project to a destination that has shorter path. I belive it's simlar problem they had here: https://github.com/dbushell/grunt-svg2png/issues/17 .

Is there a fix or work around for this issue?

Error message:

[14:20:19] Starting Karma server...

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENAMETOOLONG
    at errnoException (child_process.js:1001:11)
    at Process.ChildProcess._handle.onexit (child_process.js:792:34)
weslley39 commented 9 years ago

+1

tommck commented 9 years ago

+1

I think this can be mitigated by passing the specs directly to karma, like:

gulp.src([])
 .pipe(karma({
            configFile: config.karmaConfigFile,
            exclude: config.karmaExcludeFiles,
            files: config.karma.files, // This is globs in an array
            singleRun: true
        }));
lazd commented 9 years ago

gulp-karma is deprecated (#43). Please use Karma directly to avoid this issue: https://github.com/karma-runner/gulp-karma