title: How do I import Axios into main.js in Vue?
body: <p>I seem to not be able to use axios in my vue project as it's saying that 'axios' is not defined when I try using <code>axios.get()</code> in my file for <strong>Home.vue</strong>. Am I doing something wrong in main.js where I configure it? Or am I missing something that needs to be added? Below is my code for <code>main.js</code> and it shows how I'm adding axios to my project.</p>
  <pre><code>import Vue from 'vue';
  import GSignInButton from 'vue-google-signin-button';
  import ElementUI from 'element-ui';
  import axios from 'axios';
  import './assets/element-variables.scss';
  import locale from 'element-ui/lib/locale/lang/en';
  import App from './App.vue';
  import router from './router';
  import store from './store';
  
  Vue.config.productionTip = false;
  Vue.use(ElementUI, { locale });
  Vue.use(GSignInButton);
  Vue.use(axios);
  Vue.use(ElementUI);
  
  new Vue({
    router,
    store,
    render: (h) =&gt; h(App),
  }).$mount('#app');
  </code></pre>
  <p><strong>Edit:</strong> The solution for this issue for me was to install a vue plugin called vue-axios and follow the steps to configure here: <a href="https://www.npmjs.com/package/vue-axios" rel="nofollow noreferrer">https://www.npmjs.com/package/vue-axios</a></p>