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. #12045

Closed
drew0530 opened this issue Jan 18, 2018 · 4 comments

Comments

@drew0530
Copy link

drew0530 commented Jan 18, 2018

Current Behavior:

$ create-react-app my-app

Creating a new React app in C:\Users\SwoleDaddyBuffNeck\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.

I have tried everything under the sun, including uninstalling and reinstalling node, npm, and the create-react-app package, switching to a different version, and every variation of how to add npm to my PATH I could find on the internet. I dont usually have issues with npm, and I use it for several other projects, and it seems to work fine, I cannot figure out why it's only happening here. I could actually install react and react-dom manually, but when I tried installing react-scripts, it didnt output anything and I had to ctrl+c to get my console back.

I understand this is not a forum for npm, but as I described, I dont have this issue in other projects, and it works fine doing literally anything else. Any help would be greatly appreciated.

@gaearon
Copy link
Collaborator

gaearon commented Jan 18, 2018

Filing this in https://github.com/facebookincubator/create-react-app/ would probably be more appropriate as this will get lost in this repo.

I don’t have an obvious fix in mind but maybe you could try installing Yarn and see if that works instead?

Another thing worth trying is this: facebook/create-react-app#3326 (comment)

@drew0530
Copy link
Author

drew0530 commented Jan 18, 2018

I'm assuming you mean to run these lines here:

reg delete "HKLM\Software\Microsoft\Command Processor" /v AutoRun /f
reg delete "HKCU\Software\Microsoft\Command Processor" /v AutoRun /f

I ran the first line and it returned:
ERROR: Invalid syntax.

HOWEVER I did run regedit to see if I could manually delete that value, but it doesnt appear to be there. I mean I think maybe the best option to get started ASAP is just accept defeat here but it just makes me scratch my head and wonder why things like this occur out of nowhere.

@drew0530
Copy link
Author

drew0530 commented Jan 18, 2018

Also I opened an issue in the create-react-app thread: facebook/create-react-app#3861

@gaearon
Copy link
Collaborator

gaearon commented Jan 18, 2018

Closing in favor of facebook/create-react-app#3861.

@gaearon gaearon closed this as completed Jan 18, 2018
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

2 participants