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

When using nuxt 3 & i18n outputs ошибку @intlify_shared.js #2134

Closed
ghost opened this issue Jun 3, 2023 Discussed in #2133 · 22 comments · Fixed by #2239
Closed

When using nuxt 3 & i18n outputs ошибку @intlify_shared.js #2134

ghost opened this issue Jun 3, 2023 Discussed in #2133 · 22 comments · Fixed by #2239

Comments

@ghost
Copy link

ghost commented Jun 3, 2023

Discussed in #2133

Originally posted by Roman-00 June 3, 2023
When using next 3 & i18n, it throws an error related to the cache and the @intlify package

nuxt version - 3.5.2

nuxt/i18n version - "@nuxtjs/i18n": "8.0.0-beta.12",

Screenshot of the error

Снимок экрана 2023-06-03 в 17 06 31

Minimal build to view the error: https://github.com/Roman-00/iteca.events/tree/PR-3

@ghost ghost changed the title When using next 3 & i18n outputs ошибку @intlify_shared.js When using nuxt 3 & i18n outputs ошибку @intlify_shared.js Jun 4, 2023
Copy link
Collaborator

kazupon commented Jun 5, 2023

Thank you for your reporting!

Unfortunately, We could not reproduce your repo.
We need more detail reproduction step.
Could you give us it please? 🙏

@ghost
Copy link
Author

ghost commented Jun 6, 2023

Hello!

repos - https://github.com/Roman-00/test-nuxt-i18n
Minimal repository with an error

Installed i18n in the project, then specified in the modules in nuxt.config

When starting the dev environment, this error falls into the developer console

package manager - using pnpm

@HuanVo
Copy link

HuanVo commented Jun 7, 2023

I have same this issue. I add @intlify/nuxt3 to modules in nuxt.config.ts to resolved this issue.

Copy link
Collaborator

kazupon commented Jun 7, 2023

@Roman-00
Thank you for your reproduction!
However, I could not reproduce this issue 😞
We need more infomation.
Could you try to run npx nuxi info please?

@ghost
Copy link
Author

ghost commented Jun 7, 2023

@Roman-00 Thank you for your reproduction! However, I could not reproduce this issue 😞 We need more infomation. Could you try to run npx nuxi info please?

what exactly didn't work out? When installing dependencies via pnpm i, then launch the pnp dev project, go to the browser, open the developer console and see the error in the console tab

@ghost
Copy link
Author

ghost commented Jun 7, 2023

@Roman-00 Thank you for your reproduction! However, I could not reproduce this issue 😞 We need more infomation. Could you try to run npx nuxi info please?

After executing npx nuxi info

Nuxi 3.5.2 4:38:35 PM
4:38:35 PM
RootDir: /Users/vassin/PhpstormProjects/test-nuxt-i18n 4:38:35 PM
Nuxt project info: (copied to clipboard) 4:38:36 PM


  • Operating System: Darwin
  • Node Version: v16.20.0
  • Nuxt Version: 3.5.2
  • Nitro Version: 2.4.1
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: modules
  • Runtime Modules: @nuxtjs/[email protected]
  • Build Modules: -

👉 Report an issue: https://github.com/nuxt/nuxt/issues/new 4:38:36 PM

👉 Suggest an improvement: https://github.com/nuxt/nuxt/discussions/new

👉 Read documentation: https://nuxt.com

@ghost
Copy link
Author

ghost commented Jun 8, 2023

@intlify/nuxt3

?????

Copy link
Collaborator

kazupon commented Jun 9, 2023

Could you try to add strict-peer-dependencies=false to .npmrc and re-install with pnpm ?

@ghost
Copy link
Author

ghost commented Jun 9, 2023

Does not work

@mrFANRA
Copy link

mrFANRA commented Jun 9, 2023

Some error ...

Server console doesnt have errors.

Chrome console:
caught SyntaxError: The requested module '/_nuxt/node_modules/.cache/vite/client/deps/@intlify_shared.js?v=8d5a169e' does not provide an export named 'assign' (at message-compiler.mjs?v=5cc3b937:6:18)

FireFox console:
Uncaught SyntaxError: ambiguous indirect export: format

Screenshot_17

Strangely, everything worked fine and at one moment project fail. Cache clearing, deleting node_modules doesnt help.

@ghost
Copy link
Author

ghost commented Jun 11, 2023

Could you try to add strict-peer-dependencies=false to .npmrc and re-install with pnpm ?

The error exists now, and has not been resolved

@ghost
Copy link
Author

ghost commented Jun 11, 2023

Some error ...

Server console doesnt have errors.

Chrome console: caught SyntaxError: The requested module '/_nuxt/node_modules/.cache/vite/client/deps/@intlify_shared.js?v=8d5a169e' does not provide an export named 'assign' (at message-compiler.mjs?v=5cc3b937:6:18)

FireFox console: Uncaught SyntaxError: ambiguous indirect export: format

Screenshot_17

Strangely, everything worked fine and at one moment project fail. Cache clearing, deleting node_modules doesnt help.

Please tell me if the problem was solved?

@ghost
Copy link
Author

ghost commented Jun 11, 2023

Could you try to add strict-peer-dependencies=false to .npmrc and re-install with pnpm ?

Here is a reproduction of the error on the sandbox - https://stackblitz.com/edit/nuxt-starter-cdfvem?file=README.md

Copy link
Collaborator

kazupon commented Jun 12, 2023

Thanks.
I've noticed that there isn't .npmrc in your reproduction.
I've forked your reproduction, and add .npmrc on it.
so, it' works.
https://stackblitz.com/edit/nuxt-starter-8eqht8?file=.npmrc

@mrFANRA
Copy link

mrFANRA commented Jun 12, 2023

Thanks. I've noticed that there isn't .npmrc in your reproduction. I've forked your reproduction, and add .npmrc on it. so, it' works. https://stackblitz.com/edit/nuxt-starter-8eqht8?file=.npmrc

I have this file, with shamefully-hoist=true strict-peer-dependencies=false but error exist =(

@ghost
Copy link
Author

ghost commented Jun 12, 2023

mrFANRA

I have this file, with shamefully-hoist=true strict-peer-dependencies=false but error exist =(

@ghost
Copy link
Author

ghost commented Jun 12, 2023

Here is a reproduction of the error on the

Here is a reproduction of the error on the repos - https://github.com/Roman-00/iteca

Error playback video

zapis-ekrana-2023-06-12-v-170023_1xPCNLNf.mp4

Also, due to the module, there is a bug with auto-updating of the page !!!!!

@ghost
Copy link
Author

ghost commented Jun 13, 2023

Thanks. I've noticed that there isn't .npmrc in your reproduction. I've forked your reproduction, and add .npmrc on it. so, it' works. https://stackblitz.com/edit/nuxt-starter-8eqht8?file=.npmrc

The error remained, the above provided a video + repository in which this error is reproduced. In stackblitz.com there is no way to open the developer console to identify this problem

@ghost
Copy link
Author

ghost commented Jun 14, 2023

Thanks. I've noticed that there isn't .npmrc in your reproduction. I've forked your reproduction, and add .npmrc on it. so, it' works. https://stackblitz.com/edit/nuxt-starter-8eqht8?file=.npmrc

How will the problem be solved? Since now the problem has not disappeared

@kazupon
Copy link
Collaborator

kazupon commented Jun 14, 2023

Ah, That issue had already opened
#2098

I thiink that issue is helpful.

@ghost
Copy link
Author

ghost commented Jun 15, 2023

Ah, That issue had already opened #2098

I thiink that issue is helpful.

Nothing from this branch helps

@Banayaki
Copy link

Ah, That issue had already opened #2098
I thiink that issue is helpful.

Nothing from this branch helps

I faced the same issue. Before installing @nuxtjs/i18n@next, I accidentally installed @nuxtjs/i18n. I believe this was the root of the problem in my case. So, I did a clean npm install, and it started working just fine.

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

Successfully merging a pull request may close this issue.

4 participants