ESLint: NuxtAxiosInstance not found in '@nuxtjs/axios'(import/named)
See original GitHub issue// package.json
"@nuxtjs/axios": "^5.13.6",
"nuxt": "^2.15.7",
import { Context } from '@nuxt/types'
import { NuxtAxiosInstance } from '@nuxtjs/axios'
const someFunc = (context: Context) => {
const { $axios }: { $axios: NuxtAxiosInstance } = context;
$axios.get("something")
}
ES Lint throws following errro:
error NuxtAxiosInstance not found in ‘@nuxtjs/axios’ import/named
I looked inside axios/types/index.d.ts and there are simply no exports at all. Only module declarations. So, this makes it impossible to use NuxtAxios types anywhere in your app?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Nuxt/TypeScript: Cannot access this - TS2339: Property 'XXX ...
I find it strange this isn't referenced in the docs. The shown example with this.$axios does not work out of the box. Anyway,...
Read more >Store - Nuxt TypeScript
import { NuxtAxiosInstance } from '@nuxtjs/axios' let $axios: ... It has just released a new API, although it is not yet compatible in...
Read more >error after running v0.15 | Quasar Framework Community
Hi I need help with the newest version when I command quasar dev and i encountered this error. X:\some\directories\client\src\pages\404.vue ...
Read more >@nuxtjs/axios | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >Getting Started With Axios In Nuxt - Smashing Magazine
This way, we do not have to hard code our API into our app which is useful for working with two APIs (development...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please see https://github.com/nuxt-community/axios-module/issues/555
Seems to work with
import type
instead of justimport
😃In my case I wasn’t using ‘#app’ after I change the import it back to work.