Isuee by installing dependencies
Arcturus91 opened this issue · comments
Arturo Barrantes Vasquez commented
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:
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
Arturo Barrantes Vasquez commented
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
Arturo Barrantes Vasquez commented
example of how to execute it:
- Inside the folder you want to install the project
- Run:
npm config set legacy-peer-deps true
npx create-react-app my-app --template rmw