user21279941
user21279941

Reputation: 1

ANTV npm install fails

Installing ANTV fails without --legacy-peer-deps option.

NPM install fails with: npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @ant-design/[email protected] npm ERR! Found: @ant-design/[email protected] npm ERR! node_modules/@ant-design/icons npm ERR! @ant-design/icons@"^5.0.1" from the root project npm ERR! @ant-design/icons@"^5.0.0" from [email protected] npm ERR! node_modules/antd npm ERR! antd@"^5.1.6" from the root project npm ERR! peer antd@">=4.4.2 || >=5.0.0-beta.0" from @antv/[email protected]

Package.json looks like: "engines": { "node": "18.x", "npm": "8.x" }, "dependencies": { "@ant-design/charts": "^1.4.2", "@ant-design/icons": "^5.0.1", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "antd": "^5.1.6", "classnames": "^2.3.2", "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.8.0", "react-scripts": "5.0.1", "serve": "^14.2.0", "web-vitals": "^2.1.4" },

Upvotes: 0

Views: 809

Answers (1)

joshi
joshi

Reputation: 55

I had a similar issue. There is currently a conflict between the @ant-design/charts and @ant-design/icons packages. You can read more about it here.

I fixed my issue by selectively installing the needed antd charts. For example instead of installing @ant-design/charts, I installed @ant-design/plots.

Upvotes: 0

Related Questions