Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Latest axios Conflicting peer dependency: axios@0.21.4 #273

Open
mulib opened this issue Feb 19, 2023 · 1 comment
Open

Latest axios Conflicting peer dependency: axios@0.21.4 #273

mulib opened this issue Feb 19, 2023 · 1 comment

Comments

@mulib
Copy link

mulib commented Feb 19, 2023

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: axios-cache-adapter@2.7.3
npm ERR! Found: axios@1.3.2
npm ERR! node_modules/axios
npm ERR!   axios@"^1.2.6" from the root project
npm ERR!   peer axios@"^1" from axios-cache-interceptor@1.0.1
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 axios-cache-adapter@2.7.3
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: axios@0.21.4
npm ERR! node_modules/axios
npm ERR!   peer axios@"~0.21.1" from axios-cache-adapter@2.7.3
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

@arthurfiorette
Copy link

arthurfiorette commented Feb 19, 2023

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.

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

No branches or pull requests

2 participants