Uncaught ReferenceError: axios is not defined
npm install --save axios vue-axios
PS: it is impossible to add Axios alone. It needs to be combined with Vue Axios. The plug-in only integrates Axios into vue.js.
Error reason & Solution:
//wrong
axios.post(...)
//right
this.axios.post(...)
Read More:
- [Solved] Vue3 process Error: Uncaught ReferenceError: process is not defined
- How to Solve “Vue is not defined” Error
- [Solved] Uncaught (in promise) TypeError: XXX.a is not a constructor
- [Solved] Vue item error: Regeneratorruntime is not defined
- [Web Browser] “Uncaught TypeError: object is not a function“
- [Solved] vite2+vue3 jsx Error: React is not defined
- [Solved] Vuepress Package Error: document is not defined
- [Solved] vite package Error: globalThis is not defined
- [Solved] vuecli2+axios Error: NotSameOriginAfterDefaultedToSameOriginByCoep
- vue eslint error ‘process‘ is not defined no-undef [How to Solve]
- [Solved] JQuery each Method Error: $XXX is not defined
- [Solved] Vue 3 Script Setup ESLint Error: ‘defineProps‘ is not defined
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- Vuepress build error: window is not defined [How to Solve]
- Ant design vue table Error: h is not defined [How to Solve]
- [Solved] Nuxt Import qrcodejs2.js / QRCode.js Error: document is not defined
- ArcGIS API for JavaScript Error Uncaught(in promise): TypeError: xxx is not a constructor
- [Solved] Vue Error: Uncaught TypeError: Vue.createApp is not a function
- Solve the asynchronous execution of callback function in Axios request processing interceptor
- Vue2.0: How to Use vue3 api to encapsulate Axios