LivelyKernel / lively.installer

Installing and updating lively.next
3 stars 1 forks source link

Socket.io doesn't work with Node 8.6.0 (cannot ./start.sh) #8

Closed darth-cheney closed 6 years ago

darth-cheney commented 6 years ago

Hi everyone,

There are two things I'm having a problem with when installing according to the instructions in the README. First, it's unclear which version of node is required when running the initial download and bash script. I've been using LTS (6.10) and when first trying to install I got a warning saying I needed to use 7 or higher.

I then installed 8.6. The install worked, but starting didn't:

(nodeenv)[~/Projects/lively.next]: ./start.sh
[lively.modules] SystemJS configured with lively.transpiler & babel
/Users/???/node_modules/socket.io/lib/store.js:35
Store.prototype.__proto__ = EventEmitter.prototype;
                                        ^

TypeError: Cannot read property 'prototype' of undefined
    at Object.<anonymous> (/Users/ecgade/node_modules/socket.io/lib/store.js:35:41)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/ecgade/node_modules/socket.io/lib/manager.js:16:13)
    at Module._compile (module.js:624:30)

It seems that EventEmitter has been deprecated in node 8, and that socket.io is in its current state no longer compatible.

This might not be a big deal, but I wanted to inform you. Node 8 should be LTS sometime this month if they stick to the schedule, and it's definitely on the socket.io people to keep their stuff up to date. I think a good start would be to indicate which node version is required somewhere in the README instructions.

rksm commented 6 years ago

Thank you! Let me check....

darth-cheney commented 6 years ago

FYI same error in Node 7.10.1

rksm commented 6 years ago

What OS are you running on? I tried on Mac OS 10.12 and can't reproduce. Tried via nvm, nodeenv, and native node install.

darth-cheney commented 6 years ago

Yes I'm just seeing now there's some leaky stuff happening with my nodeenv -- it's trying to load some way older socket.io package outside of the env that is in my home folder. No idea how or why. I erased it and everything is working.

Sorry!

rksm commented 6 years ago

No prob, good that's working :)