how2: osx: TypeError: Cannot read property 'prototype' of undefined
how2 -l bash zip only jpg
/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.<anonymous> (/usr/local/lib/node_modules/how2/node_modules/devnull/transports/transport.js:59:45)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/how2/node_modules/devnull/transports/stream.js:8:17)
at Module._compile (module.js:571:32)
Node -v v7.2.1
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 36
- Comments: 37 (10 by maintainers)
I’ve just dealt with this issue, actually we can solve it by ourself just in 1 minute (but it’s just a workaround):
Open this file:
/usr/local/lib/node_modules/how2/node_modules/devnull/transports/transport.js
(this path depends on your OS and the way you used to install node.js) and replace:by:
That’s it, no need to wait, enjoy the good part and forget the ugly part 😃
This seems to be caused by devnull and the way it imports the EventEmitter here.
I recently updated Node.js, so I ended up having this issue. As a temporary workaround I forked both
devnull
andhow2
, fixed the issue and republished on NPM as devnull2 and how-2 and seems to work.You can install it with
and you should be able to use how2 command as before.
Probably not best practice, but it works meanwhile devnull gets updated
it hurts me to write this, but I found the solution:
npm rm how2 npm install -g how-2
the executable is still called how2.
This is a sad state of affairs…
Guys, the sun shines in Italy, I cannot spend my life fixing issues 😎 Anyone is willing to take control of the project ? @PaoloCifariello ?
mfw there’s a reply from @santinic
@PaoloCifariello Ma sei bravissimo! Can we get a Pull Request ?
This issue is now 16 months old and requires a 5 minute fix. @santinic maybe it’s time to flag it as abandoned, put it up on some of the ‘maintainers wanted’ lists, or just plain hand the npm package over to the person that released how-2.
Fixed in #85.
That would be enough already! I sent you a Collaborator request
@PaoloCifariello Good to know! I should’ve just looked for an alternative logger from the beginning
@dancyfits I don’t think devnull is gonna be developed again (last commit is Nov 16, 2016). Since it was used as a logger without any fancy stuff I decided to move from devnull to winston in my fork of how2.