juliangruber / browser-run

Run code inside a browser from the command line
447 stars 62 forks source link

TypeError: Cannot call method 'pipe' of undefined #52

Closed orbiteleven closed 9 years ago

orbiteleven commented 9 years ago
TypeError: Cannot call method 'pipe' of undefined
    at /Users/damon/Workspace/base-api-client/node_modules/tape-run/node_modules/browser-run/index.js:91:55
    at process._tickCallback (node.js:442:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:929:3

Encountered this with OS X, Node v0.10.36, NPM 2.14., PhantomJS 1.9.8. Occurs with default "electron" too.

It looks like the error is on line 91, where browser.setEncoding('utf8') doesn't return browser:

if (browser.pipe) browser.setEncoding('utf8').pipe(output);
juliangruber commented 9 years ago

node 0.10 is quite old, would upgrading be an option for you?

orbiteleven commented 9 years ago

Sadly, no. We're kinda slow at updating Node (not my choice).

juliangruber commented 9 years ago

published a fix as 3.0.3