Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'npm' is not recognized as an internal or external command, operable program or batch file. #10937

Open
hari0276 opened this issue May 8, 2021 · 3 comments

Comments

@hari0276
Copy link

hari0276 commented May 8, 2021

I tried to create a react app using npx create-react-app my-app, but i get error like this...

**npx create-react-app my-app
npx: installed 67 in 8.021s

Creating a new React app in C:\Users\Harine\my-app.

'npm' is not recognized as an internal or external command,
operable program or batch file.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

'npm' is not recognized as an internal or external command,
operable program or batch file.

Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts@0.9.x has failed.

Deleting generated file... package.json
Deleting my-app/ from C:\Users\Harine
Done.**
so what should i do?

@marko-hologram
Copy link

I tried to create a react app using npx create-react-app my-app, but i get error like this...

**npx create-react-app my-app
npx: installed 67 in 8.021s

Creating a new React app in C:\Users\Harine\my-app.

'npm' is not recognized as an internal or external command,
operable program or batch file.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

'npm' is not recognized as an internal or external command,
operable program or batch file.

Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts@0.9.x has failed.

Deleting generated file... package.json
Deleting my-app/ from C:\Users\Harine
Done.**
so what should i do?

Judging by the "'npm' is not recognized as an internal or external command" message, looks like npm isn't available in your PATH or that something is messed up with your node/npm install potentially.

Try running npm -v in your terminal of choice to see if you get current npm version you have installed. If you get the same error message, you probably need to add npm to PATH properly.

Instructions how to do add stuff to PATH can be googled easily.

@hari0276
Copy link
Author

hari0276 commented May 9, 2021

Thankyou I'll try that :)

@jesslynauryn
Copy link

I tried to create a react app using npx create-react-app my-app, but i get error like this...
npx create-react-app my-app
npx: installed 67 in 8.021s
Creating a new React app in C:\Users\Harine\my-app.
'npm' is not recognized as an internal or external command,
operable program or batch file.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
'npm' is not recognized as an internal or external command,
operable program or batch file.
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts@0.9.x has failed.
Deleting generated file... package.json
Deleting my-app/ from C:\Users\Harine
Done.

so what should i do?

Judging by the "'npm' is not recognized as an internal or external command" message, looks like npm isn't available in your PATH or that something is messed up with your node/npm install potentially.

Try running npm -v in your terminal of choice to see if you get current npm version you have installed. If you get the same error message, you probably need to add npm to PATH properly.

Instructions how to do add stuff to PATH can be googled easily.

what if my npm -v is fine, and still failed to create-react-app, what should i do

@jesslynauryn jesslynauryn mentioned this issue Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants