Open dialmedu opened 2 years ago
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.
axios.interceptors.request.use(async (config: InternalAxiosRequestConfig) => {
});
const config: AxiosRequestConfig = {};
axios(config);
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.16it is downloaded by default with the command
npm i @nuxtjs/axios` it is not compatible with libraries that use only Axios