santinic/how2

OSX problem TypeError: Cannot read property 'prototype' of undefined

dataf3l opened this issue ยท 2 comments

I'm using node8

$ yarn install -n how2
yarn install v1.17.3
info No lockfile found.
[1/4] ๐Ÿ” Resolving packages...
[2/4] ๐Ÿšš Fetching packages...
[3/4] ๐Ÿ”— Linking dependencies...
[4/4] ๐Ÿ”จ Building fresh packages...
success Saved lockfile.
โœจ Done in 0.11s.

$ how2 help
/usr/local/lib/node_modules/how2/node_modules/devnull/transports/transport.js:59
Transport.prototype.proto = EventEmitter.prototype;
^

TypeError: Cannot read property 'prototype' of undefined
at Object. (/usr/local/lib/node_modules/how2/node_modules/devnull/transports/transport.js:59:46)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/lib/node_modules/how2/node_modules/devnull/transports/stream.js:8:17)
at Module._compile (module.js:652:30)

$ node --version
v8.11.3

I updated node to 12 and I still have the same problem:

[b@localhost:]$ which node
/usr/local/bin/node
[b@localhost:
]$ node --version
v12.11.0
[b@localhost:~]$ npm install -g how2
/usr/local/bin/how2 -> /usr/local/lib/node_modules/how2/bin/how2

  • how2@1.5.0
    updated 1 package in 7.691s
    [b@localhost:~]$ how2 help
    /usr/local/lib/node_modules/how2/node_modules/devnull/transports/transport.js:59
    Transport.prototype.proto = EventEmitter.prototype;
    ^

TypeError: Cannot read property 'prototype' of undefined
at Object. (/usr/local/lib/node_modules/how2/node_modules/devnull/transports/transport.js:59:46)
at Module._compile (internal/modules/cjs/loader.js:945:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10)
at Module.load (internal/modules/cjs/loader.js:798:32)
at Function.Module._load (internal/modules/cjs/loader.js:711:12)
at Module.require (internal/modules/cjs/loader.js:838:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/usr/local/lib/node_modules/how2/node_modules/devnull/transports/stream.js:8:17)
at Module._compile (internal/modules/cjs/loader.js:945:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10)
[b@localhost:~]$

Hi @dataf3l.
This is an issue with devnull dependency that was already discussed and solved. (#89)

TL DR. You should use how-2 instead of how2 to get last updates.