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.

Bug: NuxtAxiosInstance no longer exported

See original GitHub issue

Issue

The interface is no longer exported from type definitions and also results in an issue with the vuex.d.ts file: https://github.com/nuxt-community/axios-module/blob/main/types/vuex.d.ts as this will try to import it as well.

Solution:

NuxtAxiosInstance should be exported here: https://github.com/nuxt-community/axios-module/blob/main/types/index.d.ts

Related and possibly related:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:9

github_iconTop GitHub Comments

9reactions
amirhoseinsalimicommented, Mar 8, 2022

The solution is to use import type like so:

import type { NuxtAxiosInstance } from '@nuxtjs/axios';

4reactions
ThomasBernecommented, Jan 7, 2022

I have the same problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt/TypeScript: Cannot access this - TS2339: Property 'XXX ...
After adding axios plug nuxt.config.js inside the plugins folder add axios-accessor.ts with the following content :
Read more >
Getting Started With Axios In Nuxt - Smashing Magazine
In this tutorial, we will learn how to make a request in our Nuxt.js applications using the Axios module. We will also learn...
Read more >
Extending axios - nuxtjs/axios
If you need to create your own axios instance which based on $axios defaults, you can use the create method. plugins/api.js export default ......
Read more >
Separate business logic from UI in Vue.js application
import { Employee } from '~/types/employee' export interface ... export default class Employees { axios: NuxtAxiosInstance error: ...
Read more >
Using Nuxt with the Vue 3 Class Based Components in ...
Its syntax is cleaner, mixins are no longer needed to separate concerns, ... import/no-mutable-exports let $axios: NuxtAxiosInstance export ...
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