Axios-module: inject is not a function

Created on 31 Aug 2017  路  3Comments  路  Source: nuxt-community/axios-module

npm run dev

  modules: [
    '@nuxtjs/axios',
  ],

Get Error

inject is not a function

.nuxt/axios.js:133:2 (module.exports.__webpack_exports__.a)
.nuxt/index.js:115:51 ( _callee$)
internal/process/next_tick.js:188:7 (process._tickCallback)


axios.interceptors.response.use(undefined, errorHandler.bind(ctx));

  // Inject axios to the context as $axios
  inject('axios', axios)

  // Setup axios helpers
  setupHelpers(axios)
}

module.exports.__webpack_exports__.a@133:2

How to fix?

https://github.com/nuxt/nuxt.js/issues/1511#issuecomment-326402224

This question is available on Nuxt.js community (#c11)

Most helpful comment

image

Thank you!

All 3 comments

Hi. Please upgrade to nuxt rc8 for using axios module 4.0.0+ :)

image

Thank you!

works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WtekSupport picture WtekSupport  路  6Comments

artmarydotir picture artmarydotir  路  4Comments

mrleblanc101 picture mrleblanc101  路  4Comments

lyzs90 picture lyzs90  路  4Comments

altafsayani picture altafsayani  路  3Comments