0

I want to start the server, but when I enter the command yarn run dev gives Yarn requires Node.js 4.0 or higher to be installed. I installed the latest available version of NodeJs, but nothing has changed. I also entered the command npm install -g yarn, but nothing worked either. How else can you solve this problem?

Arfeo
  • 870
  • 7
  • 20
kaplenk05
  • 1
  • 1
  • 2
  • What happens when you type `yarn`? – Arfeo Oct 25 '19 at 17:04
  • `node -v` probably still reads the same version, I'm guessing. On windows try `where node` or on Unix `which node`. That will tell you the order of the resolved executables located on your machine, if you have multiple installed, which it sounds like you do. – Patrick Roberts Oct 25 '19 at 17:06
  • I had a similar issue on Ubuntu where running `yarn install` worked, but running `sudo yarn install` gave me that error message about Node.js 4.0. I resolved it by updating the `PATH` for sudo. (Actually I just removed the binary that `sudo which yarn` identified, but that is hacky and it would be better to fix the sudo `PATH`.) See my full question: https://stackoverflow.com/a/59018953/3287963 – J0hj0h Nov 24 '19 at 14:56

1 Answers1

2

If the NVM already installed, try at the terminal $ source ~/.nvm/nvm.sh