code-server: Yarn installation fails incompatible engine 'node'
OS/Web Information
- Web Browser: ~
- Local OS: Android q aarch64 (arm64)
- Remote OS: ~
- Remote Architecture: ~
code-server --version: latest
Steps to Reproduce
- Latest termux version
- apt update && apt upgrade && apt install build-essential python git nodejs-lts yarn
3.yarn global add code-server
Expected
Install?
Actual
yarn complains about nodejs version expected v14 (the old lts) The problem is the nodejs-lts is now v16 how can i get v14? Should I go with the standalone install?
Screenshot

About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (8 by maintainers)
Commits related to this issue
- Replace nodejs with nodejs-lts in Termux docs (#4336) nodejs installs v16 which is not compatible. nodejs-lts currently uses v14. — committed to coder/code-server by mrfoxie 3 years ago
@RoyGalaxy, @code-asher told VS-Code is not compatible with that Node.js version yet, so the least we can do is just wait. Or, if you use Termux, persuade theyr developers to downgrade Node package, or make them offer a build 14 as a separate package, which is what I’m trying to do here: https://github.com/termux/termux-packages/issues/7930
Look at the link, it now works!
We are stuck using the version of Node that VS Code supports unfortunately (I did test 16 just to see but it was not compatible).
Workaround: use VHEditor https://github.com/vhqtvn/VHEditor-Android
By the way, all we need to do is targeting the latest node.js version. I hope it’s easy enough
Edit: For the records, here is the issue https://pastebin.com/AYyUkABU
Note I’m using nodejs-lts package from Termux repository
Btw, i digged in my old backups i found code-server with node 14 installed I’m using it and it’s working fine, I want to pack a .deb of node 14 for sharing if any one wants it, also so I can install on other devices,
anyone know if it’s possible to pack a .deb package of node?
In fact, I’m having troubles with extensions, beside this, it works
Look at this: https://github.com/termux/termux-packages/issues/7930#issuecomment-961784596
Ah yeah I should have mentioned you can force this with:
FORCE_NODE_VERSION=16 yarn global add code-server --ignore-engines
Anything above 14 is untested so use at your own risk! 😃
I also tried nvm and the --ignore-engines flag while installing via yarn none of them worked kindly make code-server compatible with v16 of node 🙏
Chiming in as I’m also attempting to do a new install with a similar environment.
nvmdoesn’t work on Termux because Termux is now required to use aPREFIXenv var to work with Android 11’s new security policies.nvmdoes not allow this and the only suggestion I’ve seen is to clear thePREFIX, which is not possible without completely breaking Termux.I’ve also attempted to use
n, which is a similar solution for running multiple instance of Node, however,ndoesn’t appear to install a version of Node compatible with the OS. It may still be a solution, though more testing is needed, but I currently believe Termux/Android users are stuck with onlylatestand-ltsversions of Node.Unfortunately v14 isn’t available anymore according to node the new nodejs-lts v16 started 5 days ago, and I can’t find the old package in archives, i think you will have to somehow support the new lts?
I had a backup of my previous install, i will stick with it for now with code-server v3.9.3, i will test again with steps from node-argon2 when I’m free, thanks guys for your efforts