Categories
JavaScript Answers

How to fix the /usr/bin/env: node: No such file or directory error with Node forever?

Spread the love

To fix the /usr/bin/env: node: No such file or directory error with Node forever, we clear the npm cache.

We run

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

to force clear the NPM cache with

sudo npm cache clean -f

Then we install the latest version of n with

sudo npm install -g n

We run the latest stablke version with

n stable

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *