Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么1.1.2版本的peer dependencies中限制antd为3.x #144

Open
joexzy opened this issue Oct 11, 2022 · 8 comments
Open

为什么1.1.2版本的peer dependencies中限制antd为3.x #144

joexzy opened this issue Oct 11, 2022 · 8 comments

Comments

@joexzy
Copy link

joexzy commented Oct 11, 2022

1.1.2版本的@ant-design/compatible中的package.json里写有peer dependencies, antd为3.x。我理解这个是v3升级到v4的兼容包,那么宿主环境中装的antd版本应该是v4的,这里为什么要这么限制呢?同时因为我的项目必须升级至react17以上,所以也不可能有antd3共存在项目中。

@alexsegura
Copy link

alexsegura commented Oct 20, 2022

Same problem here, trying to install

  • @ant-design/compatible 1.1.2
  • antd 4.23.6
$ npm update --dry-run

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/antd
npm ERR!   dev antd@"^4.21.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer antd@"3.x" from @ant-design/[email protected]
npm ERR! node_modules/@ant-design/compatible
npm ERR!   dev @ant-design/compatible@"^1.1.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-10-20T12_41_04_388Z-debug-0.log

@wj0990
Copy link

wj0990 commented Nov 19, 2022

alexsegura
How did you solve the problem without yarn install

@alexsegura
Copy link

@wj0990 I removed @ant-design/compatible because actually I didn't need it.

@rayzang8
Copy link

I think this is a bug, I just use yarn install to skip the warnning

@andypan-twn
Copy link

Since the code change between v1.1.0 and v.1.1.2, the peerDependencies have only changed from >=3.0.0 to 3.x on the package.json file.

@zombieJ have some issues or ideas on the v1.1.0?

@ZacharyBear
Copy link

ZacharyBear commented Apr 10, 2024

Same problem.

I just upgraded my Eslint from 6 to 8, and it needs Node 16. Everything works well.
When I try to install the @ant-design/[email protected], there's a dependency error occurs:

$ npm i @ant-design/[email protected]
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/antd
npm ERR!   antd@"^4.24.16" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer antd@"3.x" from @ant-design/[email protected]
npm ERR! node_modules/@ant-design/compatible
npm ERR!   @ant-design/compatible@"1.1.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/zenkiebear/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/zenkiebear/.npm/_logs/2024-04-10T02_32_17_710Z-debug-0.log

@chrisheseltine
Copy link

Anyone figure out how to fix this? I can't go to antd 5 because it breaks all my styles. I need to have antd 4.x and with this package v4 to v3 (1.1.2) i get this same peer deps issue.

@ZacharyBear
Copy link

ZacharyBear commented Jun 7, 2024

You need to refactor your old components to new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants