santinic / how2

AI for the Command Line
https://how2terminal.com
MIT License
5.72k stars 156 forks source link

DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead. #70

Closed wayneashleyberry closed 7 years ago

wayneashleyberry commented 8 years ago

I get the following deprecation notice when running how2

DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.

Here's some debug information:

how2 -v
how2 version 1.1.0 - by Claudio Santini
npm -v
3.8.9
node -v
v6.2.0

Here's a screenshot :)

screen shot 2016-05-31 at 11 57 23 am

goibon commented 7 years ago

The warning comes from the devnull module. They've already fixed it in their master branch by accepting a pull request but they have yet to bump the version in their package.json file to allow people to update through npm.

You could go bump this issue in hopes that they push the update.

cglong commented 7 years ago

I tried installing how2 today and when running, I get the following error and it exits out:

/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:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.require (module.js:500: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:573:32)

Any ideas around this? 😄

goibon commented 7 years ago

@cglong Which version of Node are running? Because this issue is regarding the deprecation of the EventEmitter which as of Node 7 is gone and how2 will only work with versions <= 6.x.x

cglong commented 7 years ago

@goibon Yeah, I just double-checked, and I'm running Node 7.0.0. I should be able to downgrade my local Node, but we'll need a more-permanent solution for other users who (like me) updated their version of Node to 7.0.0 using Homebrew or another package manager. Thanks! 😄

goibon commented 7 years ago

@cglong No problem 😄 I'm frustrated myself as a Homebrew user that I can no longer use how2 without modifying the local devnull module 😞 The options I see are:

  1. Switch away from devnull as a dependency for how2
  2. Get devnull to bump their version so we can get their fix by running npm update