When NPM starts, an error is directly reported: cyclic dependency
You can read the above blog to find out what this mistake is about
Let’s start my solution now (for Vue, please draw inferences from others)
In main.js
import axios from './util/ajax' // Registering components to Vue Vue.prototype.$axios = axios
Then where you need to send a request
Just use this. $Axios. Get instead of Axios. Get
Similar Posts:
- How to Solve Request failed with status code 404
- [Solved] (6) Axios error reporting, cannot read property ‘protocol’ of undefined
- [Solved] Axios Cross-domain issues: No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
- Axios gets the upload progress error: xhr.upload.addEventListener is not a function
- Using Vue + Axios: axios.post error: request failed with status code 400 is one of the solutions
- [Solved] axios Configurate baseURL Error: Uncaught TypeError: Cannot set properties of undefined (setting ‘baseURL’)
- How to Solve Vue3 ts setup getCurrentInstance Error
- [Solved] Vue3 Import Cutomize Components Error: Cannot find module ‘xxx‘ or its corresponding type declarations