Reputation: 33
I am trying to run ruby on rails in my ubuntu 18.04. But when I compile it, I recive this error Webpacker requires Node.js >= 8.16.0 and you are using 8.10.0 but I tried using nvm npm to change the version still nodejs version.Help me out to change this version.
Upvotes: 1
Views: 2376
Reputation:
I resolved this by upgrading with Node Version Manager and not npm.
sudo apt update
sudo apt install build-essential checkinstall libssl-dev
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.1/install.sh | bash
Close and reopen the terminal.
Then, verify if you have successfully installed NVM:
nvm --version
check nvm version to update Node.js
nvm ls
nvm ls-remote
To see a list of all available Node.js versions
nvm install [version.number]
https://phoenixnap.com/kb/update-node-js-version
Upvotes: 2