question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bump Axios version?

See original GitHub issue

Hi, I tried the new TS supported version but it throws “incompatible types” errors. It’s probably, because the axios version is locked to ~0.18.0 but the latest release is 0.19. Maybe unblock this restriction so that npm could use the latest to avoid type conflicts?

Argument of type 'import("/node_modules/axios/index").AxiosInstance' is not assignable to parameter of type 'import("/node_modules/axios-auth-refresh/node_modules/axios/index").AxiosInstance'.
  The types of 'defaults.adapter' are incompatible between these types.
    Type 'import("/node_modules/axios/index").AxiosAdapter | undefined' is not assignable to type 'import("/node_modules/axios-auth-refresh/node_modules/axios/index").AxiosAdapter | undefined'.
      Type 'import("/node_modules/axios/index").AxiosAdapter' is not assignable to type 'import("/node_modules/axios-auth-refresh/node_modules/axios/index").AxiosAdapter'.
        Types of parameters 'config' and 'config' are incompatible.
          Type 'import("/node_modules/axios-auth-refresh/node_modules/axios/index").AxiosRequestConfig' is not assignable to type 'import("/node_modules/axios/index").AxiosRequestConfig'.
            Types of property 'method' are incompatible.
              Type 'string | undefined' is not assignable to type '"get" | "GET" | "delete" | "DELETE" | "head" | "HEAD" | "options" | "OPTIONS" | "post" | "POST" | "put" | "PUT" | "patch" | "PATCH" | undefined'.
                Type 'string' is not assignable to type '"get" | "GET" | "delete" | "DELETE" | "head" | "HEAD" | "options" | "OPTIONS" | "post" | "POST" | "put" | "PUT" | "patch" | "PATCH" | undefined'.

edit I’m happy to make a PR if we agree on some solution.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Flyrellcommented, Dec 28, 2019

This has been fixed in axios/axios#2207, so I guess we don’t need to bother any more (it has not published yet). Also, I think it will be nice to add axios as an peerDependency instead of dependency.

0reactions
Flyrellcommented, Jan 13, 2020

@tmilos Will try to update ASAP. Would you please open a new issue? thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases · axios/axios - GitHub
Promise based HTTP client for the browser and node.js - Releases · axios/axios.
Read more >
axios | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Axios - npm
Promise based HTTP client for the browser and node.js. Latest version: 1.2.1, last published: 22 days ago. Start using axios in your project ......
Read more >
Bump axios from 0.21.1 to 0.21.4 (#16709) · b61bdf83f3
2. package.json · 18. yarn.lock ...
Read more >
Polls reveal Trump's FBI search bump - Axios
Several anti-Trump GOP strategists say they're worried the FBI search put wind in Trump's sails.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found