-1
root-pc@PC:~$ create-react-app hello-world

Then I get error

warning You are using Node "13.0.0-nightly2019062763a0f4cdd3" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
warning ../package.json: No license field
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

yarn add v1.16.0
warning You are using Node "13.0.0-nightly2019062763a0f4cdd3" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
warning ../package.json: No license field
[1/4] Resolving packages...
warning react-scripts > [email protected]: Please update: there are crash fixes
[2/4] Fetching packages...
error @babel/[email protected]: The engine "node" is incompatible with this module. Expected version ">=6.9.0". Got "13.0.0-nightly2019062763a0f4cdd3"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

How to fix it?

1 Answer 1

0

First, remove any instance of node and npm present using the command

sudo apt remove -y nodejs

Now, install curl and add sources using the commands

sudo apt install curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

Install nodejs using

sudo apt-get install nodejs

Install create-react-app package

sudo npm install -g create-react-app

Finally, run create-react-app

create-react-app hello-world

You must log in to answer this question.

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