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

Nuxt 3: Cannot start nuxt: Cannot read properties of undefined (reading 'options') #595

Closed vedmant closed 1 year ago

vedmant commented 1 year ago

I just installed clean Nuxt 3.0.0 and tried to use this module, but it's not working:

Cannot start nuxt: Cannot read properties of undefined (reading 'options')

danielroe commented 1 year ago

This module is not compatible with Nuxt 3. You can still use axios, of course. But I would also recommend you look at using the built-in $fetch helper in Nuxt 3.

waldirborbajr commented 1 year ago

I'm facing the same error, starting a new project from scratch, with axios:

Nuxt: 3.5.0 @nuxtjs/axios: 5.13.6 Node: v19.5.0

ERROR Cannot start nuxt: Cannot read properties of undefined (reading 'options') 9:27:52 PM

at axiosModule (node_modules/.pnpm/@nuxtjs+axios@5.13.6/node_modules/@nuxtjs/axios/lib/module.js:12:13) at installModule (node_modules/.pnpm/@nuxt+kit@3.5.0/node_modules/@nuxt/kit/dist/index.mjs:440:101) at async initNuxt (nodemodules/.pnpm/nuxt@3.5.0@types+node@18.16.13/node_modules/nuxt/dist/index.mjs:2889:7) at async load (node_modules/.pnpm/nuxi@3.5.0/node_modules/nuxi/dist/chunks/dev.mjs:201:9) at async Object.invoke (node_modules/.pnpm/nuxi@3.5.0/node_modules/nuxi/dist/chunks/dev.mjs:245:5) at async _main (node_modules/.pnpm/nuxi@3.5.0/node_modules/nuxi/dist/cli.mjs:48:20)

danielroe commented 1 year ago

https://github.com/nuxt-community/axios-module/issues/595#issuecomment-1326293604

This module is not compatible with Nuxt 3.