DEV Community

Cover image for How to fix npm create-react-app stuck at 'found 0 vulnerabilities'?

How to fix npm create-react-app stuck at 'found 0 vulnerabilities'?

Aditya Tiwari on July 03, 2020

I started learning to React recently. I was following The Net Ninjas' over YouTube. So as I was instructed to install Node.js, I downloaded and ins...
Collapse
 
harshpatel1242 profile image
harshpatel1242

Any Idea about this bro????

Could not find a required file.
Name: index.html
Searched in: C:\Users\Harsh Patel\React_Programs\my_website\public
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Harsh Patel\AppData\Roaming\npm-cache_logs\2020-11-07T06_46_48_730Z-debug.log

Collapse
 
tiwariaditya profile image
Aditya Tiwari

It's hard to say something on basis of this error. But most probably, as it says, the program needs an index.html file. Maybe you renamed it or deleted it. Can you DM me codesandbox of your app if you didn't find a solution?

Collapse
 
nekocodes profile image
Preeti • Edited

I'm back to square one.. after following process 2..
well I was wondering possibly how many times do I need to go through with this..

Collapse
 
tiwariaditya profile image
Aditya Tiwari

Umm, when I had this issue I got away by following process 2 twice after that npx create-react-app never stuck on my machine and I'm still using that same installation.

Collapse
 
nekocodes profile image
Preeti

There's on more thing I wanna ask.. whenever I m using class component in the constructor the super keyword is striked out but the app runs just the fine.. why is that so.. and what can i do??

Thread Thread
 
tiwariaditya profile image
Aditya Tiwari

Hey, I didn't come around something like this before but I have seen people talking about this. I guess, The code is fine and this is something that vscode has induced in the program. As far as, you are not pushing your code into production. You shouldn't be worried about it IMO.

Thread Thread
 
nekocodes profile image
Preeti • Edited

alright.. well i installed yarn in between which was causing the issue i uninstalled it ya

Collapse
 
nekocodes profile image
Preeti

yeah worked for me too thanks a lot

Collapse
 
_silver_hawk_ profile image
Silver

Got stuck at

"**27 vulnerabilities (16 moderate, 9 high, 2 critical)

To address all issues (including breaking changes), run:
npm audit fix --force**"

for 4 days without creation of public and src folders.

This helped a lottttt .......
Thank you, the nightmare is over !!!!

Collapse
 
harshpatel1242 profile image
harshpatel1242

thanks bro

Collapse
 
naveenkolambage profile image
Naveen Dinushka

I wanna thank you , cause i spent hrs trying to find a solution and the first suggestion worked for me, although my pc is 64bit installing 32bit worked for me!!!!!

Collapse
 
tiwariaditya profile image
Aditya Tiwari

Glad it could help you!

Collapse
 
isam123 profile image
Isam Sebri

Thanks

Collapse
 
tiwariaditya profile image
Aditya Tiwari

:)

Collapse
 
faizadie30 profile image
faiz adie

thanks bro

Collapse
 
tiwariaditya profile image
Aditya Tiwari

hey man! Welcome.

Collapse
 
hibaanj profile image
hiba anjum

I was stuck at 0 vulnerabilities and i tried step 1. And now it shows the term "npx is not recognised as.....".need to solve this plz

Collapse
 
tiwariaditya profile image
Aditya Tiwari

Did you try installing npx globally? Although npx comes installed with npm still try installing it globally.

Collapse
 
hibaanj profile image
hiba anjum

Hy thankyou soo much. It worked👍🏻👍🏻👍🏻

Thread Thread
 
tiwariaditya profile image
Aditya Tiwari

:)

Collapse
 
shreyasengar profile image
Shreya Sengar

Wow I cannot believe this actually worked. So basically it was just getting stuck and we resumed it. Thank you so very much :)

Collapse
 
tiwariaditya profile image
Aditya Tiwari

Yep :)

Collapse
 
oswaldvgomez profile image
Oswaldo Gómez

this was so helpful. Thank you so much!

Collapse
 
tiwariaditya profile image
Aditya Tiwari

Glad to hear it was helpful!!

Collapse
 
alfanfauzy profile image
alfanfauzy

Thank you mate, i can fix with no 1.

Collapse
 
tiwariaditya profile image
Aditya Tiwari

Hey man, glad it solved your problem :)

Collapse
 
muskangupta4 profile image
Muskan Gupta

Thank you so much!

Collapse
 
minhtu1701 profile image
minhtu1701

Many thanks sir.

Collapse
 
tonymyasoedov profile image
Tony Myasoedov

This worked for me:
npx clear-npx-cache