[Vuejs]-My Vue NPM imports can only find the modules if they are inside the src folder and not project root

0👍

instead of use the use function to add your axios instance globally can you please try to add it like this:

import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import VueAxios from 'vue-axios'
import firebase from 'firebase'
import "firebase/auth";
import "firebase/analytics";
import "firebase/firestore";
import moment from 'moment'

Vue.config.productionTip = false

Vue.prototype.$axios = Axios; //<---- like that

new Vue({
  render: h => h(App),
  firebase: firebase,
}).$mount('#app')

after that try to compile again. you are then able to call your axios instance on every component with this.$axios

Leave a comment