Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Suppress web3 MaxListenersExceededWarning #1088

Merged
merged 1 commit into from
Jul 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/truffle-core/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ var OS = require("os");

var command = new Command(require("./lib/commands"));

// Hack to suppress web3 MaxListenersExceededWarning
// This should be removed when issue is resolved upstream:
// https://github.com/ethereum/web3.js/issues/1648
var listeners = process.listeners('warning');
listeners.forEach(listener => process.removeListener('warning', listener));

var options = {
logger: console
};
Expand Down