3

I am new to node.js, I want to install forever on ubuntu. But unfortunately it gives me an error. See in the Picture :

[https://i.stack.imgur.com/faV9a.png1

Thomas Ward
  • 74,764

1 Answers1

3

I ran into the same issue after following this tutorial to install NodeJS.

I was able to get it work by installing a more recent NodeJS.

Follow these steps:

  1. Uninstall NodeJS:
    sudo apt purge nodejs
    sudo apt autoremove
  2. Install curl to download latest NodeJS setup:
    sudo apt-get install curl
  3. Check out https://nodejs.org/ to see what is the latest LTS version.
  4. Download it:
    curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
    (replace "12" with the current LTS major version number).
  5. Install NodeJS (incl. npm):
    sudo apt-get install nodejs
  6. Install forever:
    sudo npm install forever -g
MA-Maddin
  • 131