skip to Main Content

I try to run this create-react-app command, according to the AWS amplify tutorial

npx create-react-app react-amplified

Eventually I get this error:

npm ERR! notarget No matching version found for @babel/types@^7.22.18.

Note I am running this as an admin on my personal laptop — I don’t think I use a proxy, I don’t think I have a "company registry".

I checked these questions:

I tried to clean my cache:

npm cache clean --force

And I tried to update my registry:

npm config set registry=https://registry.npmjs.org/

But still I get the error.

Is this a case where the babel version 7.22.18, legitimately doesn’t exist, according to the npmjs registry?

I am running this command at 9/14/2023 10:15AM MST (GMT-6) (aka 2023-09-14 4:15 UTC)…

Indeed I cannot see that npmjs has a 7.22.18 version, when I visit https://www.npmjs.com/package/@babel/types?activeTab=versions
the only thing I see is the 7.22.17 version:

screenshot of https://www.npmjs.com/package/@babel/types?activeTab=versions showing only 7.22.17 version, no mention of 7.22.18

I also don’t see the 7.22.18 package available on the yarn registry:
screenshot of https://yarnpkg.com/package?q=babel%2Ftypes&name=%40babel%2Ftypes showing only 7.22.17 version, no mention of 7.22.18

It seems like the specific version @babel/types@^7.22.18; note the caret ^ means…

^1.2.3 "Compatible with version" will update you to all future minor/patch versions, without incrementing the major version. ^1.2.3 will use releases from 1.2.3 to <2.0.0.

… so this means create-react-app is searching for babel version @babel/types@^7.22.18 through <8.0.0, right?

Note, just a few minutes before I ran the above command with a failure, I ran the above command successfully. The command created a directory and installed all the necessary packages, but I had a typo in my directory name, so I deleted it and tried again. I restored the deleted file to see that it used @babel/[email protected], which has a dependency on "@babel/types": "^7.22.17", (see screenshot below). Therefore I hope @Cosimo is correct and it’s just a matter of waiting for the registry index to update…

when the npx create-react-app runs successfully, it uses @babel/core@7.22.17

UPDATE This is fixed now

Thanks to @Bomel for crosslinking …

2

Answers


  1. Same here, but… it seems 7.22.18 was published just a few minutes ago: https://www.npmjs.com/package/@babel/core/v/7.22.18

    Perhaps it was a case of dependent packages being updated first.

    As of 2023-09-14 16:32 UTC, @babel/types it’s still at 7.22.17, but hopefully it will be updated soon

    UPDATE: and 7.22.19 is there now, 16:36 UTC.

    UPDATE2: @Bomel mentioned the github issue https://github.com/babel/babel/issues/15966

    Login or Signup to reply.
  2. I think, there is a bug, and they are on it (see here).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search