I also am on react-scripts@^5.0.0
So, I would personally recommend to use yarn first. But everybody has their own preferences! to do so, can type
npm install --global yarn
after that you could remove your package-lock file and run following command in the folder of your app of course
yarn
(such a surprise.) This will generate a yarn.lock file. Note that you should avoid using yarn and npm at the same time !
In that very same yarn.lock file, you will have to search for nth-check string! In a brand new react app (so far), you should find 8 occurrences of that string. This string will be set next to a package version. That's what you want to change.
In my case, I have for example
nth-check@^1.0.2: //so far. This version can be different for an older projet.
version "1.0.2"
resolved "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz"
You want top change all those wrong versions. It should look like this :
nth-check@^2.0.1:
version "2.0.1"
resolved "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz"
You will have to change a couple versions though. Not just one. I dit it (-6 times I believe.
If you save the file, launche a simple
yarn
command followed by a
yarn audit
It SHOULD fix one of your problems!
Hope this was helpfull. Cheers!