Search code examples
node.jslinuxnpmnvmtermux

How to install Nodejs 10.24.1 and Npm 5.6.1 in Termux Android?


I installed Nodejs-lts on termux. It installed the latest version v16.18.1 and npm v8.19.2. I want to downgrade/install Nodejs 10.24.1 and Npm 5.6.1.

I actually cloned an open-source project from GitHub using git to run it locally. So, the project was developed with npm v5.6.0 when I ran npm install, I got an error saying "The package-lock.json file was created with an old version of npm".


Solution

  • I found the solution,

    1. Install any proot-distro step-1 to step 3.1

    2. Then Install NVM

    Updated: Seems like Coder website has removed the 'Linux distro installation using proot-distro instructions' after reference here lol XD XD

    Anyways, here's Termux wiki,

    1. Install any Linux distro using proot-distro