简体   繁体   English

如何解决在react js中使用命令“yarn install”时出现的警告

[英]How to solve the warnings that occurs while using the command "yarn install" in react js

I'm working on a react js app.我正在开发一个 React js 应用程序。 There I build a basic application without using create-react-app command.在那里我构建了一个基本应用程序而不使用 create-react-app 命令。 So when I'm using "yarn install" command I'm getting these warning messages.因此,当我使用“yarn install”命令时,我收到了这些警告消息。 I tried to solve the same but unable to do so.我试图解决同样的问题,但无法解决。

This is the warnings which I'm getting:-这是我收到的警告:-

yarn install v1.22.19 info No lockfile found. [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... warning " > @babel/eslint-parser@7.19.1" has unmet peer dependency "eslint@^7.5.0 || ^8.0.0". warning " > eslint-config-prettier@8.5.0" has unmet peer dependency "eslint@>=7.0.0". warning " > eslint-plugin-import@2.26.0" has unmet peer dependency "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8". warning " > eslint-plugin-jsx-a11y@6.6.1" has unmet peer dependency "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8". warning " > eslint-plugin-react@7.31.11" has unmet peer dependency "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8". [4/4] Building fresh packages... success Saved lockfile. Done in 164.19s. Image with warnings带有警告的图像

I am trying to remove all the warning messages.我正在尝试删除所有警告消息。

They are harmless and can be ignored for most of the cases but if they still cause you trouble and you want to resolve them then just install it by:它们是无害的,在大多数情况下可以忽略,但如果它们仍然给您带来麻烦并且您想解决它们,那么只需通过以下方式安装它:

yarn add eslint

as for the lockfile warning it will be resolved after you install and package至于lockfile警告,安装后会解决 package

Try:尝试:

yarn add

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

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