latelierco / vue-application-insights

MIT License
26 stars 9 forks source link

Cannot read properties of undefined (reading 'appInsightsConfig') #20

Open anoushkarevealit opened 2 years ago

anoushkarevealit commented 2 years ago

Hi!

I was trying to install Application Insights into my Vue application and I ran into the following error:

Screen Shot 2022-09-01 at 3 02 30 pm

Here is the code snippet that I used to try and initialise application insights into my app: I have Vue 2.6.12. import Skeleton from "vue-loading-skeleton"; import VueCookies from "vue-cookies"; import VueAppInsights from "vue-application-insights";

import Skeleton from "vue-loading-skeleton";
import VueCookies from "vue-cookies";
import VueAppInsights from "vue-application-insights";

require("./bootstrap");
require("./events.js");
require("./store/subscriber.js");
require("./constant.js");
import Vue from "vue";

axios.defaults.baseURL = window.apiUrl;

Vue.use(VueCookies);
Vue.use(Skeleton);
Vue.use(alert);
Vue.use(loading);
Vue.use(VueAppInsights, {
    id: "<my_id>",
    appInsightsConfig: {}
});

Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key]);
});

require("./blade_component_list.js");

new Vue({
    store
}).$mount("#app");

Any ideas what is wrong? Thanks!

illespaeuaa commented 1 year ago

hi! I've just run into the same issue, have you managed to solve it?