create-nuxt-app icon indicating copy to clipboard operation
create-nuxt-app copied to clipboard

@nuxtjs/axios not in types tsconfig.json

Open dawidstefaniak opened this issue 5 years ago • 4 comments

Hi, After using create-nuxt-app, the Axios has been bootstrapped.

If you are using TypeScript, you need to have "@nuxtjs/axios" defined in types array in compilerOptions object of the tsconfig.json. If you don't do it, the compiler shows you error, that "$axios is not defined on type Context".

I propose adding "@nuxtjs/axios" to types by default to not get this error.

dawidstefaniak avatar Jan 16 '21 15:01 dawidstefaniak

Agreed. Following this pattern would be good: https://github.com/nuxt/create-nuxt-app/pull/688

danielroe avatar Jan 16 '21 16:01 danielroe

v3.5.0 has been published

clarkdo avatar Jan 17 '21 20:01 clarkdo

Is this implemented?

danielroe avatar Jan 17 '21 20:01 danielroe

Sorry, I thought it's @nuxt/content

clarkdo avatar Jan 17 '21 21:01 clarkdo