You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(config: AxiosRequestConfig): AxiosPromise<any>', gave the following error. Argument of type 'AxiosRequestConfig<any>' is not assignable to parameter of type 'AxiosRequestConfig'
#576
Open
dialmedu opened this issue
May 12, 2022
· 1 comment
I get the following error message with the release version v15.3.16
No overload matches this call.
Overload 1 of 2, '(config: AxiosRequestConfig): AxiosPromise<any>', gave the following error.
Argument of type 'AxiosRequestConfig<any>' is not assignable to parameter of type 'AxiosRequestConfig'.
Overload 2 of 2, '(url: string, config?: AxiosRequestConfig): AxiosPromise<any>', gave the following error.
Argument of type 'AxiosRequestConfig<any>' is not assignable to parameter of type 'string'.
49 |
50 | flushPendingRequests(null);
> 51 | resolve($axios(originalRequest));
| ^^^^^^^^^^^^^^^
52 | } catch (e) {
53 | console.log('refreshing token failure ...'); // eslint-disable-line
54 | e.status = 403;`
The error is because error.config returns an AxiosRequesConfig<any> and to create an instance of axios the config argument is of type AxiosRequesConfig, therefore they are not compatible
In the release version v5.13.6 uses axios version 0.21.1 this version does not use AxiosRequesConfig<any>
With Axios version 0.25.0 the problem is solved, it is required in themain branch but not in the release version. [v15.3.16](https://github.com/nuxt-community/axios-module/blob/v5.13.6/package.json#L24) it is downloaded by default with the command npm i @nuxtjs/axios it is not compatible with libraries that use only Axios
The text was updated successfully, but these errors were encountered:
Config inside interceptors has a different interface. If you explicitly specify the config type, use InternalAxiosRequestConfig instead of AxiosRequestConfig. AxiosRequestConfig is the external/raw config interface.
I get the following error message with the release version
v15.3.16
I am trying to use the following code
The error is because error.config returns an
AxiosRequesConfig<any>
and to create an instance of axios the config argument is of typeAxiosRequesConfig
, therefore they are not compatibleIn the release version v5.13.6 uses axios version 0.21.1 this version does not use
AxiosRequesConfig<any>
With Axios version 0.25.0 the problem is solved, it is required in the
main
branch but not in the release version. [v15.3.16](https://github.com/nuxt-community/axios-module/blob/v5.13.6/package.json#L24)
it is downloaded by default with the commandnpm i @nuxtjs/axios
it is not compatible with libraries that use only AxiosThe text was updated successfully, but these errors were encountered: