facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.73k stars 26.85k forks source link

Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts has failed. #6776

Closed RitikSinha closed 5 years ago

RitikSinha commented 5 years ago

npx create-react-app basics

Creating a new React app in C:\Users\Ritik Sinha\Desktop\reactjs\basics.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts...

npm ERR! Invalid or unexpected token

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Ritik Sinha\AppData\Roaming\npm-cache_logs\2019-04-09T05_31_07_862Z-debug.log

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

Deleting generated file... package.json Deleting basics/ from C:\Users\Ritik Sinha\Desktop\reactjs Done.

KhadijaMahanga commented 5 years ago

@RitikSinha what is the exact issue you're facing?

pankajChangra commented 5 years ago

@RitikSinha Try: npm cache clean --force and then: create-react-app basics

heyimalex commented 5 years ago

I noticed that you have a space in your username, so you may need to update your version of npx, which suffers from #6512.

RitikSinha commented 5 years ago

Problem is solved. 😀😀. I just uninstalled node js and delete all its files in local and cache and all the node modules and npm and npm cache folder In this directory
C:\Users\Ritik Sinha\AppData\Roaming\ (AppData folder was hidden in my case) And then reinstall node js.. And it worked 😅..

RitikSinha commented 5 years ago

That was last option for me. Actually I have tried everything but none worked for me. Thanks guys for your concern. 😊