Update Node on FreePBX 13 Distro

Current version of Node on 10.13.66-22 is v0.12.18. The current version of Node is 11.3. I need at least Node v5 (I think) to support class declarations.

Since FreePBX is using an extremely old version, I assume it is required for something. (We don’t use UCP at all and can uninstall it.)

Has any one updated Node on 10.13.66-22? What breaks? Can I get to V5 on 10.13.66-22?

I can’t answer your question, but I can say that SNG7 has the version you need:

[root@freepbx ~]# node -v
v8.11.3

edit - but if mem serves, you are on 13 because of HA

1 Like

Yes, that is why we’re still on 13 on this system. But since I run into a version wall with PHP 5.3 and Node 0, we may just have to live with a hot stand-by. Any updates on when HA will be available for later 14 or 15?

It’s being worked on and there are no ETA’s right now. Yeah, this has been asked in a few other threads and that was the last update to pretty much all the threads.

1 Like

No you can’t because nodejs 4+ requires a new C++ compiler.

You can write code against NodeJS 11 and then use babel to transpile it for 0.12. Zulu is an example of this process where everything is using class declarations.

This may not be a good idea, but I downloaded and extracted node-v10.14.1-linux-x64.tar.xz to /tmp and extracted bin/node to my project directory and called ./node MyServer.js and so far seems to be working.

Am I going to find out later I shot myself in the foot? Would not be the first time. :laughing:

You really should just use a transpiler like Babel instead of hacking apart your HA system. if you cared so much about it being HA i’d think you wouldn’t be messing around with it as much as you are. Very scary.

4 Likes

@tm1000 Wise advise, which I shall certainly follow. This is a dev system and I’m working at proof of concept level. HA is a final production requirement. I have multiple HA systems in production and in dev, hence all questions about HA are not all the same system. Thank you for all your help.