Skip to content

Instantly share code, notes, and snippets.

@hzoo
Last active May 24, 2024 15:21
Show Gist options
  • Save hzoo/df94af2d2ec48696e683b772c775aa67 to your computer and use it in GitHub Desktop.
Save hzoo/df94af2d2ec48696e683b772c775aa67 to your computer and use it in GitHub Desktop.
`No matching version found for` babel

You might of seen something like:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/types@^7.9.6.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget

similar issues here

Check if the package for which npm throws an error is published by searching on the npm website.

For example: @babel/types

image

Here you can validate that the version on the website is up to date. If it's there, then it was correctly published on our end, but for some reason your package manager client doesn't find it, likely due to using a proxy. In this case, we won't be able to do anything on our end.

Proxies

This seems to happen right after a publish, as the cache's need to update.

If you are using a proxy (Nexus) for the npm registry (maybe it's used by your company, or you are using it because your country blocks the main npm registry), then it's likely that it has cached the old version of the package and it isn't loading the new one. If you can, try clearing the proxy's cache. Otherwise, you will have to wait until the cache is automatically updated (it might take a few hours, or even days).

If you are not using a proxy, or if it isn't a caching problem, please report the issue to npm instead of the Babel repo!

@jenroques
Copy link

Understood, but I do see the new version is still at 0 downloads and was published 3 hours ago. Wanted to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment