Axios encapsulate error: cyclic dependency [How to Solve]

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: