0

I am trying to install react-web.

Running the command

npx create-react- app .

It tells me

npx command not found. This haven't happen earlier.

Then I run npx -v

Again the same error:

'npx command not found'.

I decide to install npx. I run sudo npm i -g npx And this is what I get(refer the picture)enter image description here. How do I tackle this?

Community
  • 1
  • 1

1 Answers1

2

Ok. I did it finally.

Here are the steps I had to follow.

  1. Open the terminal.
  2. cd into /usr/local/bin/
  3. ls the directory
  4. Will find an npx file.
  5. (remove this file)sudo rm -i npx
  6. (re-install npx) sudo npm i -g npx
  7. Done!

Hope it helps someone in need.