How to fix npm's "notarget No matching version found" error
If you're seeing an error like this when trying to npm install
something:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for some-package@version
But you know for a FACT that that package (and version) definitely exists and is on npm, then it's probably a local caching issue.
Fix it with:
npm cache clean --force
It might take a while to run. But then you can npm install
as usual.
In my case (on Windows) I get an error about trying to delete a non-empty directory, but it still resolved the problem so SHRUG.