Skip to content

Instantly share code, notes, and snippets.

@hzoo
Last active July 11, 2024 15:44
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

Seeing issues with the new 7.24.6 version across various packages. Any idea when this will be available again? Currently seeing build failures inside of piplines because of the packages not being available.

@nicolo-ribaudo
Copy link

It really depends on which proxy is sitting between you and npm. I have seen proxies that break for weeks, others that needs a couple hours, and others that work as they should.

@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.

@asotogsf
Copy link

this issue started to happen today again in other app, this is my test
➜ unknown-pkg-test ls
package.json
➜ unknown-pkg-test npm i @babel/helper-module-transforms@7.24.8
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/helper-module-transforms@7.24.8.
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! A complete log of this run can be found in:
npm ERR! /Users/asoto/.npm/_logs/2024-07-11T15_34_55_327Z-debug-0.log
➜ unknown-pkg-test

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