WhirIO / Client

The whir.io chat client.
MIT License
9 stars 0 forks source link

error at launch #3

Closed ackdav closed 7 years ago

ackdav commented 7 years ago

saw it on producthunt, tried it and am getting this:

/usr/local/lib/node_modules/whir.io/app/core/whir.js:9
const getHeaders = async ({ user, channel, pass, store }) => {
                         ^

SyntaxError: Unexpected token (
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/whir.io/app/index.js:4:14)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
fakeharxy commented 7 years ago

+1, also getting this.

washimimizuku commented 7 years ago

+1

Cosrnos commented 7 years ago

Not a perfect solution, but this assumes you have node >= 7.x.x installed. Try switching versions with NVM.

In the long term I think it'd be good to support transpilation until the async keyword lands in LTS (i.e. october)

ackdav commented 7 years ago

in that case I'll close and come back in a while if it has the support

aichholzer commented 7 years ago

Thank you​ guys for this. Indeed it expects you have, at least, Node 7.8 installed. The docs mention this. nvm is the best solution for this, it's the only thing I use to switch versions.

I am not really a big fan of using transpilers as the resulting code is not the best, in terms of performance.

Cosrnos commented 7 years ago

While I agree transpilers aren't always the best solution, I think in a world where much of the community is using a different version than what you're targeting, you should be focused on delivering a new lib to as many people as possible, until 8.x hits lts, at least for the client anyway

Plus, the performance gains/losses are a bit of a moot point as you aren't hitting any bottlenecks in the client

aichholzer commented 7 years ago

@Cosrnos I agree with you on the transpilers part. As for performance, yes, there are no bottlenecks on the client, it's more of a personal standard convention, using transpilers, to me, and in my personal opinion, are almost like trying to go backwards with a fast & forward moving technology.

Anyway, I will have a look into babel & co. Pull requests are welcome, if you feel like it. 👏🏻