Search code examples
reactjsnpx

"command not found: create-react-app" error when trying to create a react app


I have started learning React JS. When I try running the command npx create-react-app myapp, I get this error:

Error: EPERM: operation not permitted, mkdir 'C:\Users\Sameha
command not found: create-react-app

Why is this happening? I have node version 14.17.5 installed.


Solution

  • Try to run it locally with npm instead:

    npm install -g create-react-app

    Then

    npm create-react-app myapp