Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

messageCompiler is not a function #39

Open
huuhait opened this issue Jan 9, 2022 · 5 comments
Open

messageCompiler is not a function #39

huuhait opened this issue Jan 9, 2022 · 5 comments

Comments

@huuhait
Copy link

huuhait commented Jan 9, 2022

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

@huuhait
Copy link
Author

huuhait commented Jan 9, 2022

same as #32

@terion-name
Copy link

same as #32

and not a single response for a month

@widmerin
Copy link

Facing the same issue with the latest Nuxt 3 Version v3.0.0-27477342.43007c6. When I want to run the build I get the error: TypeError: messageCompiler is not a function

Config:

export default defineNuxtConfig({
  buildModules: ["@intlify/nuxt3"],

  intlify: {
    vueI18n: {
      locale: "en",
      messages: {
        en: {
          hello: "Hello",
        },
        yes: {
          hello: "こんにちは",
        },
      },
    },
  },
});

Has anyone found a solution yet?

@RossComputerGuy
Copy link

RossComputerGuy commented May 2, 2022

I am also getting this error, trying to statically deploy a website. Also just running npx nuxi build && node .output/server/index.mjs and I get this error.

@RossComputerGuy
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants