DEV Community

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

Posted on

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

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 installed it (64-bit). I ran npx create-react-app app which is responsible for creating a react app with boilerplate required.

What problem did this command cause?

Once I ran this command, It would start fetching data from the repository. The folder would be created with the project name having package.json, package-lock.json, and node_modules folder. After this, the command would run and get stuck at found 0 vulnerabilities.

If you are using cmd on windows

Alt Text

If you are using bash

Alt Text

How to fix this?

I was searching a lot and found out people were asking on StackOverflow about this fix but none of them had answers and
even if some had but they were not useful. So I kept searching on GitHub under issues and came across some fixes. There are 2 ways to solve this.

Fix 1 (Easy One)-

I don't know why but this problem is observed with 12.16.2-x64.msi node version. If you installed x64 version then you just need to uninstall this version and install x32 bit version. This fix should solve your problem.

Fix 2-

If you don't want to reinstall node and continue with the current version then this fix would work.

  • Open a new cmd window and run resmon command. This command opens resource monitor and you would see something like this -

Alt Text

  • Once you could see resource monitor. You need to start looking for cmd.exe processes (because there would be more than one cmd.exe based on how many windows you have got open) which are suspended. You could see if a process is suspended by right-clicking on it. Alt Text
  • If you find any cmd.exe suspended resume it. Your cmd process would also get resumed. There might be a case where cmd again stops, you just follow the above steps again.

The only problem with this is you might need to follow these steps 1 or 2 times more when using npx create-react-app before the error goes away.

Conclusion -
This was my first blog. This problem was faced by so many people out there so I tried to write this blog.

Thank You

Top comments (29)

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!!