grunt-karma icon indicating copy to clipboard operation
grunt-karma copied to clipboard

Fatal error: write after end

Open ccnokes opened this issue 10 years ago • 2 comments

When I run grunt karma, it loads up my modules and then errors out with "Fatal error: write after end". Terminal output provided below:

Camerons-MacBook-Pro:Bookmarklet cameronnokes$ grunt karma
Running "karma:unit" (karma) task
DEBUG [config]: autoWatch set to false, because of singleRun
DEBUG [plugin]: Loading karma-* from /Users/cameronnokes/Repositories/Bookmarklet/node_modules
DEBUG [plugin]: Loading plugin /Users/cameronnokes/Repositories/Bookmarklet/node_modules/karma-browserify.
DEBUG [plugin]: Loading plugin /Users/cameronnokes/Repositories/Bookmarklet/node_modules/karma-jasmine.
DEBUG [plugin]: Loading plugin /Users/cameronnokes/Repositories/Bookmarklet/node_modules/karma-phantomjs-launcher.
DEBUG [preprocessor.browserify (framework)]: Writing to temp file: "22844b46ae091ac715aedfae5d2497cb".
INFO [karma]: Karma v0.12.16 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
DEBUG [temp-dir]: Creating temp dir at /var/folders/vs/zn48bjc56pj8b606y4db_k5m0000gn/T/karma-98875158
DEBUG [launcher]: /usr/local/bin/phantomjs /var/folders/vs/zn48bjc56pj8b606y4db_k5m0000gn/T/karma-98875158/capture.js
DEBUG [preprocessor.browserify]: Processing "/Users/cameronnokes/Repositories/Bookmarklet/test/test/content.test.js".
DEBUG [preprocessor.browserify]: Processing "/Users/cameronnokes/Repositories/Bookmarklet/test/test/messaging.test.js".
DEBUG [preprocessor.browserify]: Processing "/Users/cameronnokes/Repositories/Bookmarklet/test/test/store.test.js".
DEBUG [preprocessor.browserify]: Processing "/Users/cameronnokes/Repositories/Bookmarklet/test/test/tracking.test.js".
Fatal error: write after end

Googling this error doesn't bring up anything, and my best guess is that its an issue in Karma (I might be wrong though). Does anyone have any ideas on what's going on here? (Let me know if you need me to provide more information).

ccnokes avatar Jun 16 '14 21:06 ccnokes

I'm seeing this too, but I'm pretty sure it's not a grunt-karma problem as I see it with just the karma cli runner too. Try karma-runner/karma.

dconnolly avatar Aug 06 '14 22:08 dconnolly

There's a possibility this is really an issue with requiring modules from code packaged by browserify, see https://github.com/xdissent/karma-browserify/issues/38. I'm pretty sure I was running that as well.

ccnokes avatar Aug 06 '14 23:08 ccnokes