Hasen
Hasen

Reputation: 12304

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

Upvotes: 13

Views: 26418

Answers (5)

bearacuda13
bearacuda13

Reputation: 1854

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.

Upvotes: 1

Dishant Dishu
Dishant Dishu

Reputation: 81

Just Download the latest NodeJs Version and Install them.

link -: https://nodejs.org/en/download/

currently latest version 14.16.0. Expo works fine with this version.

Upvotes: 1

Morgan  Peters
Morgan Peters

Reputation: 21

I had this issue because brew was linked to node and nvm was not the only package manager.

brew unlink node.

Upvotes: 1

Onlinogame
Onlinogame

Reputation: 1023

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

if you're not using nvm :

sudo npm install -g n
sudo n latest

Upvotes: 52

hong developer
hong developer

Reputation: 13906

Did you install the nvm?

nvm document Github

If you did not install the nvm,

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh | bash

And

Note: If the environment variable $XDG_CONFIG_HOME is present, it will place the nvm files there

export NVM_DIR="/Users/Chris/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

And

nvm install node

And

node --version

Upvotes: 1

Related Questions