简体   繁体   English

尝试使用 create-react-app 安装 ESLint 8.4.4 时找不到 404

[英]404 Not Found when trying to install ESLint 8.4.4 with create-react-app

Whenever I try to run npx create-react-app my-app, it shows the error:每当我尝试运行 npx create-react-app my-app 时,它都会显示错误:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz - Not found
npm ERR! 404 
npm ERR! 404  '@types/eslint@http://registry.npmjs.org/@types/eslint/-/eslint-8.4.4.tgz' is not in this registry.

When I try like eslint-8.4.0.tgz I can download it but 8.4.4 just doesn't exist.当我尝试像 eslint-8.4.0.tgz 一样时,我可以下载它,但 8.4.4 根本不存在。

There is an issue with v.8.4.4 on the NPM NPM 上的 v.8.4.4 存在问题

Change your package.json and use 8.4.3 instead更改您的 package.json 并改用 8.4.3

Pin it in "resolutions" for yarn将其固定在纱线的“决议”中

  "resolutions": {
    "@types/eslint": "8.4.3"
  }

or "overrides" for npmnpm的“覆盖”

  "overrides": {
    "@types/eslint": "8.4.3"
  }

more info about overriding values in NPM: How do I override nested NPM dependency versions?有关覆盖 NPM 中的值的更多信息: 如何覆盖嵌套的 NPM 依赖版本?

more about issue ( check it here ):有关问题的更多信息(在此处查看):

出问题了

It is not a problem of React, but a problem of a package @types/eslint .这不是 React 的问题,而是 package @types/eslint的问题。 Seems like the bad version of the package was upgraded and it's not downloadable.似乎 package 的坏版本已升级,无法下载。 To solve the issue, you may want to create a react app, without using create-react-app .要解决此问题,您可能需要创建一个反应应用程序,而不使用create-react-app To do this, try to use the following tutorial为此,请尝试使用以下教程

Or you can wait until the package is fixed.或者您可以等到 package 修复后。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM