执行create-react-app时遇@babel/types@^7.22.18版本匹配失败问题
使用
npx create-react-app创建React项目时遭遇@babel/types@^7.22.18版本缺失错误 问题详情
按照AWS Amplify教程执行命令npx create-react-app react-amplified创建React项目时,触发如下错误:
npm ERR! notarget No matching version found for @babel/types@^7.22.18
已尝试的无效操作
- 清理npm缓存:
npm cache clean --force - 切换至官方npm仓库:
npm config set registry=https://registry.npmjs.org/
问题根源
经核实,npm与yarn公共仓库中均无@babel/types@7.22.18版本,仅存在7.22.17版本。此前成功执行该命令时,项目依赖的@babel/core@7.22.17对@babel/types的依赖要求为^7.22.17,此次错误是依赖链更新过程中产生的版本匹配异常。
当前状态
该问题目前已修复,相关细节可参考Babel及NestJS的GitHub Issue。
内容的提问来源于stack exchange,提问作者Nate Anderson
相关产品推荐
相关产品推荐

