Skip to content

Instantly share code, notes, and snippets.

@trptcolin
Created May 17, 2019 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trptcolin/7f9eb75a11c4c165ff62678ef7140a69 to your computer and use it in GitHub Desktop.
Save trptcolin/7f9eb75a11c4c165ff62678ef7140a69 to your computer and use it in GitHub Desktop.
[colin:/tmp] $ node --version
v11.14.0
[colin:/tmp] $ node /tmp/sample.js
internal/process/stdio.js:164
stream = new tty.WriteStream(fd);
^
TypeError: tty.WriteStream is not a constructor
at createWritableStdioStream (internal/process/stdio.js:164:16)
at process.getStdout [as stdout] (internal/process/stdio.js:33:14)
at Console.get (internal/console/constructor.js:153:38)
at Console.(anonymous function) (internal/console/constructor.js:276:46)
at Console.log (internal/console/constructor.js:287:61)
at Function.defineProperty (/private/tmp/sample.js:2:11)
at Object.inherits (util.js:141:10)
at internal/streams/legacy.js:9:6
at NativeModule.compile (internal/bootstrap/loaders.js:303:5)
at nativeModuleRequire (internal/bootstrap/loaders.js:191:14)
[colin:/tmp] $ export PATH="/usr/local/opt/node@8/bin:$PATH"
[colin:/tmp] $ node --version
v8.16.0
[colin:/tmp] $ node /tmp/sample.js
hi
Object.defineProperty = function defineProperty(object) {
console.log("someone's calling this");
return object;
}
console.log("hi");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment