Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.EventEmitter is deprecated in Node.js v6.*.* #29

Open
Thimira opened this issue May 21, 2016 · 4 comments
Open

process.EventEmitter is deprecated in Node.js v6.*.* #29

Thimira opened this issue May 21, 2016 · 4 comments

Comments

@Thimira
Copy link

Thimira commented May 21, 2016

process.EventEmitter is deprecated in Node.js v6..

It is causing a deprecated warning when loading node-monitor,

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

Tested on Node.js v6.1.0, on Windows.

@Thimira
Copy link
Author

Thimira commented May 21, 2016

Upon further investigations, found that the issue is not from the monitor classes, but actually from the old version of socket.io used as a dependency (0.9.*).

Using the latest version of socket.io (1.4.6 right now) takes away the deprecated warning, and the basic functionality appears to be working with the new version.

However, more extensive tests would be needed to verify that all the functionality is working with the new socket.io version.

Any thoughts?

@lorenwest
Copy link
Owner

This package hasn't been maintained in years. If you're getting value from it and want to upgrade dependencies, issue a pull request. I'll do a quick check and publish to NPM.

@Thimira
Copy link
Author

Thimira commented May 23, 2016

@lorenwest Thanks for the quick reply. And yes, we do see value in this package.

I'm testing the updated dependencies now (upgraded socket.io to 1.4.6). Although the basic functionality works (such as the use of ProcessProbe) the unit tests are having issues.

In 2 of the unit tests - RouterTest.js and MonitorTest.js - the test gets 'stuck' at a certain test case, as if the test.done() isn't getting called:

RouterTest.js

./node_modules/.bin/nodeunit --reporter verbose test/RouterTest.js 

RouterTest.js
✔ Router - SetUp
✔ Router - Classes
  ✔ The Router data model is in place
✔ Router - ConnectInternal
  ✔ The error was null
  ✔ The router found the internal probe
✔ Router - InternalSameProbe
  ✔ The error was null
  ✔ Two monitors created with the same initParams are connected to the same probe id: 85aca867-ab08-dbc4-3545-fe1ce6af3f1a
✔ Router - InternalDifferentProbe
  ✔ The error was null
  ✔ Two monitors created with the same initParams are connected to different probes

gets stuck after that.

MonitorTest.js

./node_modules/.bin/nodeunit --reporter verbose test/MonitorTest.js 

MonitorTest.js
✔ ModuleLoad - Externals
  ✔ Config package is exported
  ✔ Cron package is exported
  ✔ Underscore package is exported
  ✔ Backbone package is exported
✔ ModuleLoad - Monitor
  ✔ The Monitor data model is in place
  ✔ The Monitor collection is in place
✔ ModuleLoad - Submodules
  ✔ The Probe submodule is in place
  ✔ The Connection submodule is in place
  ✔ The Server submodule is in place
  ✔ The Router submodule is in place
✔ Protected - UUID
  ✔ A uuid was generated
  ✔ It has the correct V.4 length
  ✔ It is unique within the test UUIDs
  ✔ A uuid was generated
  ✔ It has the correct V.4 length
  ✔ It is unique within the test UUIDs
  ................
<more test results here>
  ................
  ✔ A uuid was generated
  ✔ It has the correct V.4 length
  ✔ It is unique within the test UUIDs
  ✔ A uuid was generated
  ✔ It has the correct V.4 length
  ✔ It is unique within the test UUIDs
✔ Protected - Router
  ✔ The default router is available
✔ Writable - CanWrite
  ✔ No errors on Inspect probe connect
  ✔ Inspector connected to the test variable
  ✔ You can set the probe value using monitor.set()
✔ Writable - SetControl
  ✔ No errors on Inspect probe connect
  ✔ Inspector connected to the test variable
  ✔ You can set the probe value using monitor.set()

gets stuck after that.

All other unit tests are passing.

I'm still trying to figure out the cause of this issue.
If you are able to point me in the right direction to check it would be great.

Thanks.

@luzmcosta
Copy link

I've encountered the same warning, DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead., with the following set up:

Environment
socket.io 1.4.6
express 4.13.3
node 6.1.0
npm 3.8.6
Mac OS X El Capitan 10.11.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants