question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'config' of undefined

See original GitHub issue

I used before version 8.12.0 today, I update new version 8.15.1 I use vue-i18n-loader 0.4.1

this error in browser

Uncaught (in promise) TypeError: Cannot read property 'config' of undefined
    at VueI18n._initVM (vue-i18n.esm.js?d8f9:1183)
    at new VueI18n (vue-i18n.esm.js?d8f9:1122)

in this code

VueI18n.prototype._initVM = function _initVM (data) {
    var silent = Vue.config.silent;  // excuted error at this line, Vue is `undefined`
    Vue.config.silent = true;
    this._vm = new Vue({ data: data });
    Vue.config.silent = silent;
  };

how reolve this problem?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
ssikoroncommented, Dec 3, 2019

I had the same issue - turned out I forgot to call Vue.use(VueI18n) before creating the i18n instance.

Here’s the code which works for me with 8.15.1:

import Vue from "vue";
import VueI18n from "vue-i18n";

Vue.use(VueI18n);

const i18n = new VueI18n({
  locale: "en",
  { ... }
});

new Vue({
  i18n,
  router,
  store,
  render: h => h(App)
}).$mount("#app");
7reactions
jbnvcommented, Dec 9, 2019

Why is the instance dependent on the Vue variable? I’m trying to use a local instance of VueI18n to do translations within only one particular module. Shoehorning everything into a global instance of VueI18n is a major problem for my project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'config' of undefined ... - GitHub
The error occurs when a null/undefined value is passed to the tailwindcss function. 2
Read more >
Cannot read property 'config' of null TypeError - Stack Overflow
This error occurs when angular cannot find .angular-cli.json file (Do note there is a dot in the file name). Usually it is a...
Read more >
Cannot read property 'config' of undefined
In my case I got this error because was using the "fieldName" attribute after calling the force:recordData callback. In the component: <force: ...
Read more >
TypeError: Cannot read property 'config' of null - General
Hello, Each time I run the program that I have done, it works but node-red shows me the following error 3 times: TypeError:...
Read more >
typeerror: cannot read properties of undefined (reading 'config')
You're passing an empty object to User.findAll({}) in your UserController.js file. Try User.findAll() , instead.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found