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!

@chelsumz007
Copy link

@wikingwei @FernandoGOT getting the same error. seems like 7.18.2 is not yet published on npm. any resolution?

@nicolo-ribaudo
Copy link

nicolo-ribaudo commented May 25, 2022

It's on npm: https://www.npmjs.com/package/@babel/core/v/7.18.2

please report this bug to them!

@Radiant-O
Copy link

seems like 7.18.5 is not yet published, when will it be published?

@nicolo-ribaudo
Copy link

Of which package? We only publish packages which have changed since the previous version.

@Radiant-O
Copy link

@babel/parser@^7.18.5.

@nicolo-ribaudo
Copy link

nicolo-ribaudo commented Jun 22, 2022

@Radiant-O
Copy link

Radiant-O commented Jun 22, 2022

https://www.npmjs.com/package/@babel/parser is already published
babel

I'm getting this error
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/parser@^7.18.5.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

pls what is the solution?, the package is already published, I just checked.

@Radiant-O
Copy link

Where can I report the bug?, Link?

@nicolo-ribaudo
Copy link

Is there a proxy between you and the npm registry? (for example a company proxy, a verdaccio instance, or something like cnpmjs.org)
Yes -> It's a problem with that proxy, its cache needs to be updated
No -> It might be a bug with the npm registry

@GitSkelly
Copy link

I am getting the same error as @Radiant-O, except with @babel/helper-environment-visitor@^7.18.6. Any updates on how to fix this?

@Radiant-O
Copy link

uninstall the whole cli and re-install, it should work,
P.S You can try re installing your node, don't download the latest version, the previous should work.

@KhangVo1204
Copy link

KhangVo1204 commented Sep 6, 2022

today I got error:

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

what is the solution?

@RavimDhinesh
Copy link

I am also getting the same error as KhangVo1204 mentioned. Kindly provide with the solution

@bobjeronowitz-gs1us
Copy link

I am getting the same error now for version 7.19.1

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

what is the solution?

@andieromero
Copy link

Hello, I am now getting it for 7.19.3

7820 error notarget No matching version found for @babel/generator@^7.19.3.
7821 error notarget In most cases you or one of your dependencies are requesting
7821 error notarget a package version that doesn't exist.

@apelluru
Copy link

apelluru commented Sep 30, 2022

Hey, I am also getting similar error:

[INFO] npm ERR! code ETARGET
[INFO] npm ERR! notarget No matching version found for babel-plugin-transform-react-jsx@^7.19.0.
[INFO] npm ERR! notarget In most cases you or one of your dependencies are requesting
[INFO] npm ERR! notarget a package version that doesn't exist.

from logs:

1342 verbose Darwin 21.6.0
1343 verbose node v16.17.1
1344 verbose npm v8.15.0
1345 error code ETARGET
1346 error notarget No matching version found for babel-plugin-transform-react-jsx@^7.19.0.
1347 error notarget In most cases you or one of your dependencies are requesting
1347 error notarget a package version that doesn't exist.
1348 verbose exit 1

@atilajanosi
Copy link

atilajanosi commented Oct 20, 2022

image

npm install @babel/traverse@^7.19.6
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/traverse@^7.19.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.

@adrox37
Copy link

adrox37 commented Feb 20, 2023

notarget No matching version found for @babel/parser@^7.21.0

image

@anatoliip33
Copy link

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

@eramudeep
Copy link

getting same error.

MicrosoftTeams-image

@ShayanBits
Copy link

ShayanBits commented Sep 25, 2023

I confirm @eramudeep 's finding:

We already checked whether it is the local npm registery's cache which causes this issue.
However seeing the number of downloads (0) , 4 hours after the publish can confirm there must be something wrong.

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

CleanShot 2023-09-25 at 1 54 14@2x

@nicolo-ribaudo
Copy link

However seeing the number of downloads (0) , 4 hours after the publish can confirm there must be something wrong.

Please contact the npm support

@ShayanBits
Copy link

UPDATE: it has been fixed after one day. 👍

@KobloshAlex
Copy link

2024-01-25 13:00:57.260 npm ERR! code ETARGET
2024-01-25 13:00:57.260 npm ERR! notarget No matching version found for @babel/traverse@^7.23.9.
2024-01-25 13:00:57.260 npm ERR! notarget In most cases you or one of your dependencies are requesting
2024-01-25 13:00:57.260 npm ERR! notarget a package version that doesn't exist.

npm error

@jainsachin121
Copy link

npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/traverse@^7.24.1.
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
npm ERR! notarget It was specified as a dependency of '@babel/helpers'

Getting the same error again today after new version releases. Kindly look into this.
Error

@jainsachin121
Copy link

Is there a proxy between you and the npm registry? (for example a company proxy, a verdaccio instance, or something like cnpmjs.org) Yes -> It's a problem with that proxy, its cache needs to be updated No -> It might be a bug with the npm registry

Yes we have a company proxy but why issue with these babel packages only?, Everyday lot many packages published and we have not encountrer this issue with any other npm package. If you can provide more insite then it will really helpful.

@nicolo-ribaudo
Copy link

nicolo-ribaudo commented Mar 22, 2024

Yes we have a company proxy but why issue with these babel packages only?, Everyday lot many packages published and we have not encountrer this issue with any other npm package. If you can provide more insite then it will really helpful.

Because we publish many packages (sometimes more than 100) in a short span of time (less than a minute usually), and some proxies fetch a few of them and not the others.

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

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