FruitieX/teleirc

NodeJS 4.8.6 became unsupported. / What is the required NodeJS version?

Closed this issue ยท 10 comments

info: using config file from: /home/users/mikaela/.telepirateirc/config.js
info: forcing log level to "silly"
/home/users/mikaela/src/github/fruitiex/teleirc/node_modules/tgfancy/lib/client.js:172
class Tgfancy extends TelegramBot {
^^^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/users/mikaela/src/github/fruitiex/teleirc/node_modules/tgfancy/lib/index.js:10:16)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

226c7f8 works.

A work-around is to install a later version of nodejs. The easiest way to do so that I found is to install n. It worked for me on Ubuntu, but I did not get it to work in the Docker container. Not sure why.

I think those instructions are dangerous as if I understood correctly, they will overwrite system installed node with manually installed version and I think that will cause issues when you try to update node with package manager the next time.

However stripping sudo I think it may be a solution for the case I had in mind with this issue as I don't have root on that system.

On another host where I have root, I found https://github.com/nodesource/distributions#debmanual nicer way to update node without conflicting with package manager.

I also now remembered seeing in the group an alternative to n and https://davidwalsh.name/nvm looks safer to me.

I think those instructions are dangerous as if I understood correctly, they will overwrite system installed node with manually installed version and I think that will cause issues when you try to update node with package manager the next time.

Yep, it is potentially dangerous. But I just wanted to put it out there for other people searching for a workable solution if they do not have any critical nodejs services running on their system.

Another less dangerous option might be nvm. I would recommend using at least the LTS version of Node (8.9.4 right now).

The required node version should be in the documentation at least!

The required node version should be in the documentation at least!

๐Ÿ‘ edited title & retagged.

@FruitieX

I would recommend using at least the LTS version of Node (8.9.4 right now).

Does this imply that we can use full ES6 syntax and not care about Node 4 or Node 6 compatibility when creating pull requests?

@Tuupertunut yeah, it does. We could set up the Babel transpiler to support older versions of Node, but even then you're a bit "on your own" in untested territory (some stuff would still need polyfills etc)

I clarified in the README that you should be running teleirc with the latest LTS version of node.js.