Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Expo - Node.js version 11.13.0 is no longer supported

I'm using Expo with React Native but when trying to create a new project I get the error:

ERROR: Node.js version 11.13.0 is no longer supported.

expo-cli supports following Node.js versions:
* >=8.9.0 <9.0.0 (Maintenance LTS)
* >=10.13.0 <11.0.0 (Active LTS)
* >=12.0.0 (Current Release)

$ node --version

v11.13.0

$ npm install npm@latest -g

...lib/node_modules/npm/bin/npx-cli.js
+ [email protected]`
added 6 packages from 4 contributors, removed 11 packages and updated 36 packages in 9.92s

$ node --version

v11.13.0

$ expo init myApp

...throws same error above again.

EDIT: $ which node

/Users/hasen/.nvm/versions/node/v11.13.0/bin/node

$ /usr/local/bin/node --version

v10.16.2

like image 449
Hasen Avatar asked Aug 13 '19 12:08

Hasen


2 Answers

nvm install node --reinstall-packages-from=$(nvm current)

if you're not using nvm :

sudo npm install -g n
sudo n latest
like image 66
Onlinogame Avatar answered Oct 02 '22 23:10

Onlinogame


I had installed the newer version of node using @Onlinogame's

sudo npm install -g n
sudo n latest

But it wasn't linked. Using sort of the opposite as @Morgan Peters,

brew link node

Fixed it.

like image 23
bearacuda13 Avatar answered Oct 02 '22 23:10

bearacuda13