axios-cache-adapter icon indicating copy to clipboard operation
axios-cache-adapter copied to clipboard

Latest axios Conflicting peer dependency: [email protected]

Open mulib opened this issue 2 years ago • 1 comments

package.json

...
    "axios": "^1.2.6",
    "axios-cache-adapter": "^2.7.3",
    "axios-cache-interceptor": "^1.0.1",
...

when running npm install (without --force or --legacy-peer-deps) I get a conlict error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/axios
npm ERR!   axios@"^1.2.6" from the root project
npm ERR!   peer axios@"^1" from [email protected]
npm ERR!   node_modules/axios-cache-interceptor
npm ERR!     axios-cache-interceptor@"^1.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer axios@"~0.21.1" from [email protected]
npm ERR! node_modules/axios-cache-adapter
npm ERR!   axios-cache-adapter@"^2.7.3" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/axios
npm ERR!   peer axios@"~0.21.1" from [email protected]
npm ERR!   node_modules/axios-cache-adapter
npm ERR!     axios-cache-adapter@"^2.7.3" 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.

can you tell when you going to update dependencies? or please suggest other solution

mulib avatar Feb 19 '23 12:02 mulib

Axios-cache-adapter only works for axios v0, and axios-cache-interceptor for both, please choose either axios-cache-interceptor or axios-cache-adapter, as they serve the same purpose.

P.S I'm the maintainer of axios-cache-interceptor, this predecessor.

arthurfiorette avatar Feb 19 '23 21:02 arthurfiorette