What's the best way to manage multiple node versions?

I'm trying to get code-server to work, but it requires node 16, whereas I have node 17. What's the best way to go about this? Do I install a node version manager or just downgrade my current node version, hoping it doesn't break anything?
12 Replies
Furry
Furry3y ago
Only two packages were supported per versions in termux so you only need one node at a time unless nodejs have support for Android. you cannot use nvm since it doesn't support android
WaelShaikh
WaelShaikhOP3y ago
So... You're suggesting I downgrade? (Thnx for the quick reply)
Furry
Furry3y ago
Yes, basically switching to lts version
WaelShaikh
WaelShaikhOP3y ago
So I just do:
pkg uninstall nodejs
pkg install nodejs-lts
pkg uninstall nodejs
pkg install nodejs-lts
And it won't break anything? Not even my global node modules?
Furry
Furry3y ago
if you install nodejs-lts and vice versa then one will automatically uninstalled
WaelShaikh
WaelShaikhOP3y ago
Ohh. Thanks 👍🏻
Setting up nodejs-lts (16.16.0-1) ...
CANNOT LINK EXECUTABLE "node": library "libicui18n.so.71" not found: needed by main executable
Setting up nodejs-lts (16.16.0-1) ...
CANNOT LINK EXECUTABLE "node": library "libicui18n.so.71" not found: needed by main executable
😢 I got this during installation and now node and npm return this error @marcusz sorry for pinging
Furry
Furry3y ago
you need to install libicu?
WaelShaikh
WaelShaikhOP3y ago
You're the best 🫂
komo
komo3y ago
nodejs is kinda not friendly to termux now
Furry
Furry3y ago
it's a complex javascript engine infrastructure (a.k.a skeleton chrome) so it's not termux-certified package :)
komo
komo3y ago
doesn't njs written in cpp (if am not wrong)?
Furry
Furry3y ago
that's right

Did you find this page helpful?