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

After updating nuxt and i18n versions, i18n strictMessage doesn't work. #2947

Open
yongho0605 opened this issue May 13, 2024 · 0 comments
Open

Comments

@yongho0605
Copy link

yongho0605 commented May 13, 2024

Environment

  • Operating System: Darwin
  • Node Version: v20.9.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: npm@10.1.0
  • Builder: -
  • User Config: experimental, runtimeConfig, app, build, modules, sitemap, i18n, css
  • Runtime Modules: @formkit/nuxt@1.5.9, @nuxtjs/tailwindcss@6.11.4, @nuxt/image@1.4.0, nuxt-lodash@2.5.3, @nuxtjs/sitemap@5.1.2, @nuxtjs/i18n@8.3.1
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-vzm2gj?file=package.json,locales%2Fko.json,locales%2Fen.json,nuxt.config.ts,app.vue

Describe the bug

I updated my production application libraries after a long time and got an error.
The error I reported is that if you remove the
tags in the scope of each single file component, the application works fine.

##Conclusion

  • When I reproduced the error, I got the following error message
    스크린샷 2024-05-13 오후 3 28 49

스크린샷 2024-05-13 오후 3 29 07

Before version

  • Nuxt Version: 3.6.1
  • nuxtI18n Version: 8.0.0-beta.13

Current nuxt config setting

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  experimental: {
    inlineSSRStyles: false
  },
  runtimeConfig: {
    public: {
      apiUrl: process.env.NUXT_PUBLIC_API_URL || 'https://admin.application.io/api',
      mediaUrl: process.env.NUXT_PUBLIC_MEDIA_URL || '/media'
    }
  },
  app: {
    rootId: 'application',
    buildAssetsDir: '/_static/',
    head: {
      title: 'application',
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
    }
  },
  build: {
    transpile: ['@heroicons/vue', 'gsap']
  },
  modules: ['@formkit/nuxt', '@nuxtjs/tailwindcss', '@nuxt/image', 'nuxt-lodash', '@nuxtjs/sitemap', '@nuxtjs/i18n'],
  sitemap: {
    url: 'https://www.application.io', 
    xsl: false,
    exclude: ['/inquiries/**']
  },
  i18n: {
    langDir: './locales',
    baseUrl: 'https://www.application.io',
    lazy: true,
    detectBrowserLanguage: {
      fallbackLocale: 'ko',
      cookieSecure: true
    },
    locales: [
      { code: 'ko', iso: 'ko-KR', file: 'ko.json', name: 'KOR' },
      { code: 'en', iso: 'en-US', file: 'en.json', name: 'ENG' }
    ],
    defaultLocale: 'ko',
    strategy: 'no_prefix',
    compilation: { strictMessage: false }
  },
  css: ['~/assets/main.css']
})

Updated package.json

{
  "private": true,
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare",
    "lint": "eslint . --fix --ext .js,.vue",
    "prettier": "prettier . --write",
    "prepare": "husky install",
    "set-husky": "husky add .husky/pre-commit \"npm run lint-staged\"",
    "lint-staged": "lint-staged"
  },
  "devDependencies": {
    "@nuxt/image": "^1.4.0",
    "@nuxtjs/eslint-config-typescript": "^12.1.0",
    "@nuxtjs/i18n": "^8.3.1",
    "@nuxtjs/sitemap": "^5.1.2",
    "@nuxtjs/tailwindcss": "^6.1.3",
    "@tailwindcss/typography": "^0.5.8",
    "eslint": "^8.57.0",
    "eslint-config-prettier": "^9.1.0",
    "husky": "^8.0.3",
    "lint-staged": "^15.2.2",
    "nuxt": "^3.11.2",
    "nuxt-lodash": "^2.5.0",
    "prettier": "^3.2.5",
    "prettier-plugin-tailwindcss": "^0.5.11",
    "sass": "^1.64.2",
    "tailwindcss": "^3.3.2",
    "typescript": "^5.1.3"
  },
  "dependencies": {
    "@formkit/nuxt": "^1.2.2",
    "@formkit/pro": "^0.117.5",
    "@formkit/themes": "^1.2.2",
    "@formkit/validation": "^1.2.2",
    "@headlessui/vue": "^1.7.4",
    "@heroicons/vue": "^2.0.13",
    "gsap": "^3.11.3",
    "tailwind-scrollbar-hide": "^1.1.7",
    "vue3-carousel": "^0.2.8",
    "vue3-marquee": "^3.1.2"
  },
  "lint-staged": {
    "./**/*.{js,ts,vue}": [
      "eslint --fix",
      "prettier --write"
    ]
  }
}

Additional context

I don't know where the crash is happening.

Logs

No response

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

No branches or pull requests

1 participant