create-react-app doesn't work as expected

386 Views Asked by At

I have the following setup in my system

%asdf shim-versions create-react-app
nodejs 12.16.3

% asdf current nodejs
nodejs          14.17.6         /Users/user/.tool-versions

But when I run npm to create react-app as follows get the following output

% npm init react-app react-complete-guide
No preset version installed for command create-react-app
Please install a version by running one of the following:

asdf install nodejs 14.17.6

or add one of the following versions in your config file at /Users/user/.tool-versions
nodejs 12.16.3

I have tried asdf reshim nodejs

Is there something wrong in my setup?

2

There are 2 best solutions below

2
On

It's npx create-react-app not npm create-react-app.

2
On

Solved this by uninstalling the old version of node which was what the create-react-app was tied to.

Found out how by doing asdf shim-versions create-react-app and uninstalling that node version.