Utkarsh Upadhyay
Utkarsh Upadhyay

Reputation: 19

I am trying to create react app and getting this error

'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ENOENT npm ERR! syscall spawn C:\Program Files\Java\jre-1.8\bin npm ERR! path C:\Users\2273297 npm ERR! errno -4058 npm ERR! enoent spawn C:\Program Files\Java\jre-1.8\bin ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

I used npx create-react-app myapp

Upvotes: 0

Views: 37

Answers (1)

Dave
Dave

Reputation: 63

From the looks of the error, you are trying to run npx create-react-app on a windows OS.

The error is likely that a) npx does not exist on your system, or b) you may have installed nvm (node version manager) yet did not set the nvm directory in your path.

I just ran the same in both windows developer shell and CMD and the command succeeded.

Without better details, these are just guesses based on observation. OS? Did you install Node Version Manager? Did you create a PATH to the nvm folder?

I will point you in the right direction. You have to learn how to do so by reading and following the directions. https://learn.microsoft.com/en-us/windows/dev-environment/javascript/react-on-windows

Upvotes: 0

Related Questions