LiveThe Movement
LiveThe Movement

Reputation: 33

Webpacker requires Node.js >= 8.16.0 and you are using 8.10.0

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

Answers (1)

user11386084
user11386084

Reputation:

I resolved this by upgrading with Node Version Manager and not npm.

  1. Start by updating the package repository with the command:
sudo apt update
  1. Download the following dependencies by typing:
sudo apt install build-essential checkinstall libssl-dev
  1. Install NVM using the curl command:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.1/install.sh | bash
  1. Close and reopen the terminal.

  2. Then, verify if you have successfully installed NVM:

nvm --version

check nvm version to update Node.js

  1. Before upgrading Node.js, check which version you have running on the system:
nvm ls
  1. Now you can check for newly available releases with:
nvm ls-remote

To see a list of all available Node.js versions

  1. To install the latest version, use the nvm command with the specific Node.js version:
nvm install [version.number]

https://phoenixnap.com/kb/update-node-js-version

Upvotes: 2

Related Questions