umijs / umi

A framework in react community ✨
https://umijs.org
MIT License
15.3k stars 2.65k forks source link

yarn报一堆警告 #3769

Closed Master-H closed 4 years ago

Master-H commented 4 years ago

What happens?

通过yarn安装依赖包,报了一堆警告:xxx has unmet peer dependency xxx

复现步骤,错误日志以及相关配置

复现步骤 1: yarn create umi 选app --> ts --> antd , dva, code splitting, dll 2: yarn

错误信息:

info No lockfile found.
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
warning antd > babel-runtime > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning antd > rc-tree-select > rc-trigger > rc-animate > fbjs > core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning umi > umi-build-dev > core-js@2.6.9: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning umi > umi-build-dev > decamelize > xregexp > @babel/runtime-corejs2 > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning umi > umi-ui > react-dev-utils > fork-ts-checker-webpack-plugin > chokidar > fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
warning umi > umi-build-dev > umi-notify > is-ali-env > superagent@3.8.3: Please note that v5.0.1+ of superagent removes User-Agent header by default, therefore you may need to add it yourself (e.g. GitHub blocks requests without a User-Agent header).  This notice will go away with v5.0.2+ once it is released.
warning umi > umi-build-dev > umi-test > babel-jest > @jest/transform > jest-haste-map > fsevents@1.2.9: One of your dependencies needs to upgrade to fsevents v2: 1) Proper nodejs v10+ support 2) No more fetching binaries from AWS, smaller package size
warning umi > umi-build-dev > umi-test > jest-cli > jest-config > jest-environment-jsdom > jsdom > left-pad@1.3.0: use String.prototype.padStart()
warning umi > umi-build-dev > sylvanas > @umijs/fabric > stylelint > postcss-markdown > remark > unified > @types/vfile > @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.
warning umi-plugin-react > umi-plugin-polyfills > core-js@2.6.0: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning umi-plugin-react > workbox-webpack-plugin > workbox-build > joi@11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning umi-plugin-react > workbox-webpack-plugin > workbox-build > joi > hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning umi-plugin-react > workbox-webpack-plugin > workbox-build > joi > topo@2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning umi-plugin-react > workbox-webpack-plugin > workbox-build > joi > topo > hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning umi-plugin-react > umi-plugin-locale > react-intl > intl-relativeformat@2.2.0: This package has been deprecated, please see migration guide at 'https://github.com/formatjs/formatjs/tree/master/packages/intl-relativeformat#migration-guide'
warning umi-types > @types/webpack-chain@5.2.0: This is a stub types definition. webpack-chain provides its own type definitions, so you do not need this installed.
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning "dva > connected-react-router@6.5.2" has unmet peer dependency "react-router@^4.3.1 || ^5.0.0".
warning " > eslint-config-umi@1.6.0" has incorrect peer dependency "eslint-plugin-jsx-a11y@6.x".
warning " > eslint-config-umi@1.6.0" has unmet peer dependency "eslint-plugin-react-hooks@1.5.0".
warning "eslint-config-umi > eslint-config-react-app@5.0.2" has unmet peer dependency "@typescript-eslint/eslint-plugin@2.x".
warning "eslint-config-umi > eslint-config-react-app@5.0.2" has unmet peer dependency "@typescript-eslint/parser@2.x".
warning "eslint-config-umi > eslint-config-react-app@5.0.2" has incorrect peer dependency "babel-eslint@10.x".
warning "eslint-config-umi > eslint-config-react-app@5.0.2" has incorrect peer dependency "eslint@6.x".
warning "eslint-config-umi > eslint-config-react-app@5.0.2" has incorrect peer dependency "eslint-plugin-flowtype@3.x".
warning "eslint-config-umi > eslint-config-react-app@5.0.2" has incorrect peer dependency "eslint-plugin-jsx-a11y@6.x".
warning "eslint-config-umi > eslint-config-react-app@5.0.2" has unmet peer dependency "eslint-plugin-react-hooks@1.x".
warning " > eslint-plugin-jsx-a11y@5.1.1" has incorrect peer dependency "eslint@^2.10.2 || ^3 || ^4".
warning " > tslint@5.20.1" has unmet peer dependency "typescript@>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev".
warning "tslint > tsutils@2.29.0" has unmet peer dependency "typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev".
warning " > tslint-eslint-rules@5.4.0" has unmet peer dependency "typescript@^2.2.0 || ^3.0.0".
warning "tslint-eslint-rules > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning " > tslint-react@3.6.0" has unmet peer dependency "typescript@>=2.1.0 || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev".
warning "umi > umi-build-dev > sylvanas > @umijs/fabric > @typescript-eslint/eslint-plugin@1.13.0" has incorrect peer dependency "@typescript-eslint/parser@^1.9.0".
warning "umi-plugin-react > umi-plugin-dva > babel-plugin-dva-hmr@0.4.2" has unmet peer dependency "redbox-react@1.x".
warning "umi-plugin-react > umi-plugin-dva > dva-loading@3.0.6" has unmet peer dependency "dva-core@^1.1.0 | ^1.5.0-0 | ^1.6.0-0".

*通过安装unmet peer dependency不符合包 xx,可以解决一些警告,但是当装了xx包又可能会出现xx包依赖的包unmet peer dependency,永远无法解决所有的警告

相关环境信息

chqfly commented 4 years ago

并且出现 Definition for rule '@typescript-eslint/consistent-type-assertions' 提示警告

tolbkni commented 4 years ago

我也遇到了这个问题

darkiHJS commented 4 years ago

我也出现了这个问题,而且上传github时,过测试插件会给hooks effect乱加上依赖参数。yarn安装完依赖后vscode无法提示代码

jianhao commented 4 years ago

我也是遇到这个问题,想用下ts,就初始化项目时就有这个问题,不知道如何解决?