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.

messageCompiler is not a function

See original GitHub issue

Hi team i’m getting this problem in production mode

import { enUS, viVN } from './locales'

  intlify: {
    localeDir: 'locales',
    vueI18n: {
      locale: 'en-US',
      messages: {
        'en-US': {
          ...enUS
        },
      },
    },
  },

locales/enUS.ts

  'page.global.table.favorites': 'Favorites',
  'page.global.table.status': 'Status',
  'page.global.table.name': 'Name',
  'page.global.table.date': 'Date',
  'page.global.table.time': 'Time',
  'page.global.table.pair': 'Pair',
  'page.global.table.coin': 'Coin',
  'page.global.table.currency': 'Currency',
  'page.global.table.infomation': 'Infomation',
  'page.global.table.last_price': 'Last Price',
  'page.global.table.price': 'Price',
  'page.global.table.market': 'Market',
  'page.global.table.change': 'Change',
  'page.global.table.volume': 'Volume',
  'page.global.table.sum': 'Sum',
  'page.global.table.amount': 'Amount',

Thanks for your help

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
RossComputerGuycommented, May 3, 2022

I have fixed this issue on my end. I had to append this into Vista’s nuxt 3 plugin:

import { compileToFunction, registerMessageCompiler } from '@intlify/core-base'

registerMessageCompiler(compileToFunction)
1reaction
terion-namecommented, Jan 17, 2022

same as #32

and not a single response for a month

Read more comments on GitHub >

github_iconTop Results From Across the Web

"messageCompiler is not a function" after building files. #91
i want to use $t in template section and lifecycle hook functions. so in vite.config.js. vueI18n({ include: path.resolve(__dirname, ".src/ ...
Read more >
Vue 3 i18n issue: The message format compilation is not ...
Because message compiler isn't included. You need to pre-compilation all message format. So translate function return 'hello'.
Read more >
Optimization - Vue I18n - Intlify
... improves performance because vue-i18n just only execute Message functions, so no compilation. Also, the message compiler is not bundled, ...
Read more >
@intlify/vite-plugin-vue-i18n - npm
However, with the message compiler, the javascript function conversion will not work in some environments (e.g. CSP). For this reason, vue-i18n@ ...
Read more >
intlify/message-compiler - vue-i18n-next - Yarn
@intlify/message-compiler. owner intlify1.6mMIT9.2.2TS vulns ... vue-i18n-core. #1110 fix: conflict process global object in vDirective function (@kazupon) ...
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