dtabuenc / karma-html-reporter

Karma Html Reporter Plugin
MIT License
45 stars 30 forks source link

TypeError with io.js v 2.3.0 #26

Closed bricss closed 9 years ago

bricss commented 9 years ago
ERROR [karma]: [TypeError: options must be a string or an object]
TypeError: options must be a string or an object
    at new WriteStream (fs.js:1798:11)
    at Object.fs.createWriteStream (fs.js:1784:10)
    at c:\Users\<username>\Documents\Aptana Studio 3 Workspace\admin-gui\node_modules\karma-html-reporter\index.js:89:22
    at FSReqWrap.oncomplete (fs.js:82:15)
.write(string, encoding, offset, length) is deprecated. Use write(string[, offset[, length]][, encoding]) instead.
bricss commented 9 years ago

https://github.com/karma-runner/karma/issues/1454

bricss commented 9 years ago

https://github.com/nodejs/io.js/issues/1981

bricss commented 9 years ago

Bug raised because of fs.createWriteStream is not support callbacks and could be fixed by adding error and close events rather than using callback.

ChALkeR commented 9 years ago

The callback was ignored before 2.3.0 and started generating an Error since 2.3.0. You should remove it.

https://iojs.org/api/fs.html#fs_fs_createwritestream_path_options