Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: type issue with Axios 1.7.8 #953

Open
erkannt opened this issue Dec 2, 2024 · 4 comments
Open

Bug: type issue with Axios 1.7.8 #953

erkannt opened this issue Dec 2, 2024 · 4 comments
Assignees
Labels
bug Something isn't working triage Needs triage

Comments

@erkannt
Copy link

erkannt commented Dec 2, 2024

What happened?

Upgrading to the latest version of axios causes a compilation error.

node_modules/axios-cache-interceptor/dist/cache/axios.d.ts:92:18 - error TS2430: Interface 'AxiosCacheInstance' incorrectly extends interface 'AxiosInstance'.
  The types of 'interceptors.response.use' are incompatible between these types.
    Types of parameters 'onFulfilled' and 'onFulfilled' are incompatible.
      Type 'AxiosResponse<any, any> | Promise<AxiosResponse<any, any>>' is not assignable to type 'CacheAxiosResponse<any, any> | Promise<CacheAxiosResponse<any, any>>'.
        Type 'AxiosResponse<any, any>' is not assignable to type 'CacheAxiosResponse<any, any> | Promise<CacheAxiosResponse<any, any>>'.
          Type 'AxiosResponse<any, any>' is not assignable to type 'CacheAxiosResponse<any, any>'.

92 export interface AxiosCacheInstance extends CacheInstance, AxiosInstance {

axios-cache-interceptor version

v1.6.2

Node / Browser Version

Node 18.18

Axios Version

v1.7.8

What storage is being used

Redis / Other DB

Relevant debugging log output

Does not apply. Not a runtime issue. It is a type issue in interaction with axios types.
@erkannt erkannt added bug Something isn't working triage Needs triage labels Dec 2, 2024
@arthurfiorette
Copy link
Owner

arthurfiorette commented Dec 2, 2024

Maybe duplicate of #778? #778 solution caused this probably :/ You up to a PR?

@JonathanViau
Copy link

We are facing the same issue preventing to update to axios 1.7.9 which fixes a security issue found in 1.7.7.
Could we have an estimate on a fix?

@arthurfiorette
Copy link
Owner

I currently don't have enough time to work on this right now, but I’d be happy to prioritize it if anyone is interested in sponsoring me! 😊

https://github.com/sponsors/arthurfiorette

@ArnaudBuchholz
Copy link

Hello @arthurfiorette, I created the pull request #958 to address the issue. Can you please review and let me know if this is OK for you ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Needs triage
Projects
None yet
Development

No branches or pull requests

5 participants
@ArnaudBuchholz @erkannt @arthurfiorette @JonathanViau and others