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

<i18n-n scope="global"> throws warning [intlify] Not found parent scope. use the global scope #2895

Closed
VictorKrasnov opened this issue Apr 3, 2024 · 7 comments

Comments

@VictorKrasnov
Copy link

Environment

Reproduction

Add tag to any page / component.

Describe the bug

throws warning [intlify] Not found parent scope. use the global scope.
It's very difficult to test my project because I have a lot of these warnings in the browser console.

Additional context

No response

Logs

No response

@VictorKrasnov
Copy link
Author

I'm sorry, this html-code example disappeared in issue bug description section: <i18n-n :value="12345" scope="global" />

Copy link

github-actions bot commented Apr 3, 2024

Would you be able to provide a reproduction? 🙏

More info

Why do I need to provide a reproduction?

Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.

What will happen?

If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritise it based on its severity and how many people we think it might affect.

If needs reproduction labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.

How can I create a reproduction?

We have a couple of templates for starting with a minimal reproduction:

👉 Reproduction starter (v8 and higher)
👉 Reproduction starter (edge)

A public GitHub repository is also perfect. 👌

Please ensure that the reproduction is as minimal as possible. See more details in our guide.

You might also find these other articles interesting and/or helpful:

@VictorKrasnov
Copy link
Author

Reproduction: https://stackblitz.com/edit/i18n-n-warning?file=pages%2Findex.vue

@BobbieGoede
Copy link
Collaborator

Thanks for reporting and providing a reproduction!

The fix for this has been merged upstream in vue-i18n (#1786) and has been released as well, removing lockfiles before installing will install this latest version, I've updated your reproduction to demonstrate here.

@VictorKrasnov
Copy link
Author

Thanks for reporting and providing a reproduction!

The fix for this has been merged upstream in vue-i18n (#1786) and has been released as well, removing lockfiles before installing will install this latest version, I've updated your reproduction to demonstrate here.

Sorry but I updated i18n to 8.0.3 in my project but nothing changed, I still see these warnings. What else should I check?

@BobbieGoede
Copy link
Collaborator

If removing lockfiles and reinstalling dependencies doesn't work you may have to also delete node_modules before running npm install. If you haven't pinned vue-i18n in your package.json, @nuxtjs/i18n should install the latest compatible vue-i18n@^9.9.0 version which is [email protected] which includes the fix.

If you're still getting the warning with the same usage as the reproduction then you likely have an older version installed.

@VictorKrasnov
Copy link
Author

Thank you very much, everything works now.

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