Vue error resolution: TypeError: Cannot read property’_t’ of undefined”

The front-end error report is as follows:
[Vue warn]: Error in render: “TypeError: Cannot read property’_t’ of undefined”

It is the compatibility problem between vue and i18n that multi-language configuration is used in the project. The solution is as follows:


Replace with

Vue.use(iView, {
  i18n: function(path, options) {
    let value = i18n.t(path, options)
    if (value !== null && value !== undefined) {
      return value
    return ''

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *