nuxt-community / axios-module

Secure and easy axios integration for Nuxt 2
https://axios.nuxtjs.org
MIT License
1.19k stars 245 forks source link

Nuxt3, how to fix this error #596

Closed xntop closed 1 year ago

xntop commented 1 year ago

Cannot restart nuxt: Cannot read properties of undefined (reading 'options') 18:49:43

at axiosModule (node_modules/@nuxtjs/axios/lib/module.js:12:13) at installModule (node_modules/@nuxt/kit/dist/index.mjs:416:9) at async initNuxt (node_modules/nuxt/dist/index.mjs:1825:7) at async load (node_modules/_nuxi@3.0.0@nuxi/dist/chunks/dev.mjs:6779:9) at async _applyPromised (node_modules/_nuxi@3.0.0@nuxi/dist/chunks/dev.mjs:6713:10)

danielroe commented 1 year ago

This module is not compatible with Nuxt 3. If you want to continue to use axios, you can just import axios directly, or you can look at https://github.com/Teranode/nuxt-module-alternatives. However, I would recommend using $fetch instead.

xntop commented 1 year ago

This module is not compatible with Nuxt 3. If you want to continue to use axios, you can just import axios directly, or you can look at https://github.com/Teranode/nuxt-module-alternatives. However, I would recommend using $fetch instead.

Thanks, I'll try to adapt the version