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

Error occurs at build if restructureDir contains shared/ directory #3210

Open
dungsil opened this issue Nov 8, 2024 · 2 comments
Open

Error occurs at build if restructureDir contains shared/ directory #3210

dungsil opened this issue Nov 8, 2024 · 2 comments

Comments

@dungsil
Copy link

dungsil commented Nov 8, 2024

Environment


  • Operating System: Windows_NT
  • Node Version: v22.5.1
  • Nuxt Version: 3.14.159
  • CLI Version: 3.15.0
  • Nitro Version: 2.10.3
  • Package Manager: [email protected]
  • Builder: -
  • User Config: default
  • Runtime Modules: @nuxt/[email protected], @nuxtjs/[email protected]
  • Build Modules: -

Reproduction

Source code: https://github.com/dungsil/issues/tree/main/nuxt-modules-i18n%233210
StackBlitz: https://stackblitz.com/edit/nuxtjs-i18n-3210?file=nuxt.config.ts

Describe the bug

When specifying a shared directory in restructureDir, an error occurs during build.

 Could not resolve "./shared/i18n/locales/en.json" from "node_modules/.cache/nuxt/.nuxt/dist/server/server.mjs"

Additional context

No response

Logs

No response

@userquin
Copy link
Collaborator

You should move i18n.config.ts to shared/i18n folder or configure it properly in your nuxt config file (check https://stackblitz.com/edit/nuxtjs-i18n-3210-lz3vvy)

@dungsil
Copy link
Author

dungsil commented Nov 11, 2024

Hello @userquin,

It seems to be the same situation.
Image

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

2 participants