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

4
  • The system says "This is an error with npm itself, report this error". It sounds to me like you have an issue with your Node itself. Possibly if your Node is too old this will happen (since it references Node 0.12)
    – Thomas Ward
    Jan 13, 2020 at 15:58
  • Ok, i will update my node to latest version. Jan 13, 2020 at 16:02
  • 1
    FYI, please copy screen contents as test, and paste the text into your question, instead of making a screenshot and pasting the screenshot, It is much more difficult to read a screenshot compared to text. TY,
    – K7AAY
    Jan 13, 2020 at 17:14
  • Does this answer your question? How to install the latest versions of NodeJS and NPM?
    – karel
    Jan 26, 2020 at 23:55

1 Answer 1

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
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .