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.
@RitikSinha what is the exact issue you're facing?
@RitikSinha
Try:
npm cache clean --force
and then:
create-react-app basics
I noticed that you have a space in your username, so you may need to update your version of npx, which suffers from #6512.
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 馃槄..
That was last option for me. Actually I have tried everything but none worked for me. Thanks guys for your concern. 馃槉