-
-
Notifications
You must be signed in to change notification settings - Fork 764
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
Move i18next and react-i18next to peerDependencies #1951
Conversation
…uming Yarn PnP projects don't have multiple instances of i18next See i18next#1917
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@Stale not stale! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
not stale |
I unfortunately don't see this getting merged @rikkit 😞 |
I am happily using this via the I guess I will just maintain that separate package for the forseeable. |
Per comment here: #1966 (comment) I'd suggest to move to peer-deps. Why ?
@adrai if you feel it's a good move, I'll update my P/R about i18next update: #1966. I also suggest to not use ranges like >= ... Let me know |
@belgattitude the problem is, this: #1917 |
Thanks, I'll take time to read them properly soon. I've run into similar issues in the past 2 years... Most of the time it was caused by duplicates // react-i18next/i18next and less by legit next-i18next edges cases For install issues I could fix either by
A problem that peer-deps would avoid as the consuming app has the control. Some popular react/context libraries even moved to peer-deps for the deduplication problem (even if they don't need multi-ranges): ie emotion... I haven't created a bug report about that and haven't followed so much. But about the links you've provided to read, I would recommend to gather Node/package manager cd /the-repo-or-monorepo
npx envinfo Plus cd /the-repo-or-monorepo
pnpm -r why i18next react-i18next next-i18next
// or
yarn -R why i18next
yarn -R why react-i18next
yarn -R why next-i18next
// or... Cause otherwise I feel it's difficult/time-consuming to know/distinguish between install issues (node resolution) and nextjs/next-i18next issues. In my experience there's issues in both of them, but much easier to isolate I'll try to have look. Thanks a lot |
@kachkaev @capellini can you provide feedback? |
Closing in favour of #1966 |
This PR moves
i18next
andreact-i18next
to peerDependencies, so that consuming Yarn PnP projects aren't forced to have multiple instances ofi18next
if they themselves depend onreact-i18next
.After this PR, projects that use
next-i18next
will have to ensure they havereact-i18next
andi18next
in their own dependencies:See discussion in #1917
Checklist
npm run test
tests are includedChecklist (for documentation change)