首先是安装脚手架, 许多警告。
sudo npm i @ant-design/pro-cli -g
[sudo] password for maiyasu:
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated [email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm WARN deprecated @stylelint/[email protected]: Use the original unforked package instead: postcss-markdown
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: 0.x is no longer supported. Please upgrade to 4.x or higher.
npm WARN deprecated [email protected]: 0.x is no longer supported. Please upgrade to 3.x or higher.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated @stylelint/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: 1.x is no longer supported. Please upgrade to 6.x or higher.
npm WARN deprecated [email protected]: core-js@
接着是项目创建好了,使用 yarn 工具初始化,耗费了 10 分钟,也是大量警告。
$ yarn
yarn install v1.22.19
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning react-dev-inspector > [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning react-dev-inspector > react-dev-utils > fork-ts-checker-webpack-plugin > [email protected]: this will be v4
warning @ant-design/pro-cli > pngjs-image > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @ant-design/pro-cli > babel-types > babel-runtime > [email protected]: core-js@ blink-diff > preceptor-core > [email protected]: 1.x is no longer supported. Please upgrade to 6.x or higher.
warning @ant-design/pro-cli > @umijs/fabric > stylelint > @stylelint/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
warning @ant-design/pro-cli > @umijs/fabric > stylelint > @stylelint/[email protected]: Use the original unforked package instead: postcss-markdown
warning @ant-design/pro-cli > pngjs-image > request > [email protected]: this library is no longer supported
warning @ant-design/pro-cli > pngjs-image > request > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning @ant-design/pro-cli > blink-diff > preceptor-core > log4js > [email protected]: 0.x is no longer supported. Please upgrade to 3.x or higher.
warning @ant-design/pro-cli > blink-diff > preceptor-core > log4js > streamroller > [email protected]: 0.x is no longer supported. Please upgrade to 4.x or higher.
warning @types/[email protected]: This is a stub types definition. classnames provides its own type definitions, so you do not need this installed.
warning @umijs/lint > @stylelint/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
warning @umijs/max > umi > @umijs/bundler-webpack > fork-ts-checker-webpack-plugin > [email protected]: this will be v4
warning @umijs/max > @umijs/plugins > dva-core > [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
warning @umijs/max > @umijs/plugins > react-intl > [email protected]: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
warning @umijs/max > @umijs/plugins > react-intl > intl-messageformat > [email protected]: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser
warning @umijs/max > @umijs/plugins > react-intl > @formatjs/[email protected]: We have renamed the package to @formatjs/intl-numberformat
warning @umijs/max > @umijs/plugins > react-intl > intl-messageformat-parser > @formatjs/[email protected]: We have renamed the package to @formatjs/intl-numberformat
warning @umijs/max > @umijs/plugins > react-intl > @formatjs/[email protected]: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make any further changes to this package
warning @umijs/max > @umijs/plugins > react-intl > @formatjs/intl-displaynames > @formatjs/[email protected]: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make any further changes to this package
warning @umijs/max > @umijs/plugins > react-intl > @formatjs/intl-listformat > @formatjs/[email protected]: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make any further changes to this package
warning @umijs/max > @umijs/plugins > react-intl > @formatjs/intl-unified-numberformat > @formatjs/[email protected]: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make any further changes to this package
warning @umijs/max > @umijs/plugins > react-intl > @formatjs/intl-relativetimeformat > @formatjs/[email protected]: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make any further changes to this package
warning @umijs/max > umi > @umijs/preset-umi > click-to-react-component > @floating-ui/[email protected]: Package renamed to @floating-ui/react
warning @umijs/max > umi > @umijs/bundler-webpack > @svgr/plugin-svgo > svgo > [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
warning umi-presets-pro > @alita/plugins > antd-mobile-alita > rmc-list-view > fbjs > [email protected]: core-js@ @alita/plugins > antd-mobile-alita > rc-swipeout > [email protected]: Package no longer supported. Use at your own risk or consider using https://github.com/software-mansion/react-native-gesture-handler
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning "@ant-design/pro-components > @ant-design/[email protected]" has unmet peer dependency "rc-field-form@^1.22.0".
warning "@ant-design/pro-components > @ant-design/[email protected]" has unmet peer dependency "rc-field-form@^1.22.0".
warning "react-dev-inspector > react-dev-utils > [email protected]" has unmet peer dependency "webpack@>= 4".
warning "@umijs/lint > [email protected]" has unmet peer dependency "stylelint@^14.4.0".
warning "@umijs/lint > stylelint-config-standard > [email protected]" has unmet peer dependency "stylelint@^14.4.0".
warning "@umijs/lint > @umijs/babel-preset-umi > [email protected]" has unmet peer dependency "styled-components@>= 2".
warning "@umijs/max > umi > @umijs/test > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@umijs/max > @umijs/plugins > @ahooksjs/[email protected]" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "@umijs/max > umi > @umijs/bundler-webpack > [email protected]" has unmet peer dependency "webpack@^5.11.0".
warning "@umijs/max > @umijs/plugins > [email protected]" has unmet peer dependency "dva@^2.5.0-0".
warning "@umijs/max > @umijs/plugins > [email protected]" has incorrect peer dependency "dva-core@^1.1.0 || ^1.5.0-0 || ^1.6.0-0".
warning "@umijs/max > @umijs/plugins > [email protected]" has incorrect peer dependency "react@^16.3.0".
warning "@umijs/max > umi > @umijs/preset-umi > html-webpack-plugi[email protected]" has unmet peer dependency "webpack@^5.20.0".
warning "@umijs/max > umi > @umijs/preset-umi > [email protected]" has unmet peer dependency "postcss@>4 umi > @umijs/test > [email protected]" has unmet peer dependency "@babel/core@^7.8.0".
warning "@umijs/max > umi > @umijs/bundler-webpack > @pmmmwh/[email protected]" has unmet peer dependency "webpack@>=4.43.0 umi > @umijs/bundler-webpack > [email protected]" has unmet peer dependency "webpack@^5.0.0".
warning "@umijs/max > umi > @umijs/test > babel-jest > [email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning "@umijs/max > umi > @umijs/test > babel-jest > babel-preset-jest > babel-preset-current-node-syntax > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "@types/node@*".
warning "umi-presets-pro > @umijs/[email protected]" has unmet peer dependency "umi@>=3".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[5/5] Building fresh packages...
success Saved lockfile.
$ max setup
😄 Hello PRO
info - [你知道吗?] 想快速修改 html 模板、DIY 项目?试试编写项目级插件,详见 https://umijs.org/docs/guides/directory-structure#plugints
Using openapi Plugin
info - generate files
info - Preparing...
$ husky install
fatal: not a git repository (or any of the parent directories): .git
Done in 610.08s.
这么多提示消息,让我十分焦虑。其它不单单是 AntD ,包括其它的前端项目,也是有很多这样的现象,我就是想问问,是框架的维护者们对此觉得无所谓,忍着就行,还是用户的原因,是我使用姿势不对呢?
其它的语言这种问题好像没有这么明显。
WARNING, peer, dependency, has