ant-design / ant-design-landing

:mountain_bicyclist: Landing Pages of Ant Design System
https://landing.ant.design/
MIT License
6.09k stars 624 forks source link

Isuee by installing dependencies #377

Closed Arcturus91 closed 1 year ago

Arcturus91 commented 1 year ago

Hello there,

I am having a problem while installing the initial dependencies:

npm install antd enquire-js rc-queue-anim rc-scroll-anim rc-tween-one --save; npm install rc-banner-anim --save;// 如果用的是多屏滑动型的 banner,加上这条; npm install @ant-design/compatible --save

It is about the last one:

Screen Shot 2022-09-14 at 12 58 21

The error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: landing-page-test@0.1.0
npm ERR! Found: antd@4.23.1
npm ERR! node_modules/antd
npm ERR!   antd@"^4.23.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer antd@"3.x" from @ant-design/compatible@1.1.2
npm ERR! node_modules/@ant-design/compatible
npm ERR!   @ant-design/compatible@"*" from the root project

Should I use --force? Thanks

Arcturus91 commented 1 year ago

ok, now i get it. Issue is old dependencies not maintained anymore. Solution: use the --legacy-peer-deps. Explanation here: https://github.com/npm/rfcs/discussions/283

Arcturus91 commented 1 year ago

example of how to execute it:

1) Inside the folder you want to install the project 2) Run:

npm config set legacy-peer-deps true npx create-react-app my-app --template rmw