Open bsr203 opened 8 years ago
It seems Node v7 finally removes process.EventEmitter
. Practically speaking this means that Socket.IO 0.9.x no longer works. The correct solution, at least in my mind, would be to upgrade Socket.IO or probably just use WebSockets, though I am new to this codebase and am not 100% certain why Socket.IO 0.9 is here.
If you just want a workaround, you can manually patch the local Socket.IO installation. Go to the node_modules/socket.io
for devtools-terminal
, i.e. /usr/lib/node_modules/devtools-terminal/node_modules/socket.io/
and replace process.EventEmitter
with require('events')
globally.
Example:
sudo find . -type f -name '*.js' -exec sed -i "s/process.EventEmitter/require('events')/g"
{} +
Perhaps a middleground between those two would be a fork of Socket.IO 0.9.x (does such possibly already exist?) or trying to convince the maintainers of Socket.IO to release a new 0.9.x build with this fixed.
(Also, still having trouble in Linux - the blank terminal bug. Oh well... It can be worked around using the solution linked to at the top of the README.)
(P.S.: Use the --chromium
option if you are installing for Chromium browser.)
for mac users, if they have sed
error for the command suggested above:
sudo find . -type f -name '*.js' -exec sed -i '' -e "s/process.EventEmitter/require('events')/g" {} +
https://stackoverflow.com/questions/19456518/invalid-command-code-despite-escaping-periods-using-sed
In case if you face any error "sed: RE error: illegal byte sequence" export and then run above same command.
export LC_CTYPE=C export LANG=C
It worked for me.
node --version master ✱ v7.0.0
OS X 10.9.5
npm install -g devtools-terminal ⏎ master ✱ /usr/local/bin/devtools-terminal -> /usr/local/lib/node_modules/devtools-terminal/bin/devtools-terminal /usr/local/lib └── devtools-terminal@0.1.3
Edit:
from this , it could be an issue with dependencies with node v7.