-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
ESM modules don't work with yarn P'n'P #1735
Comments
Sorry, never used yarn with a dedicated yarnPath. It seems like the problem is this package.json file: As soon as this file does not exist, it seems to work. (I tested by removing it in the zip file here: Based on the error message it seems someone (yarn, webpack or whoever) is first looking on the esm dist and afterwards at the cjs dist... the i18next package.json seems to define it correctly. If you know how to fix this without breaking other stuff like: #1681 //cc: @perrin4869 |
Yeah I also don't have much yarn experience... |
I tested a couple of those things... no luck. But honestly it works with npm (or when node_modules folder exists), so I think you should try to open an issue at the yarn repo 🤷♂️ |
well, adding |
fyi: looks like i18next-fetch-backend is |
Ah yeah, I was using |
Still curious why this works with |
@perrin4869 Seems like 4.1.1 did not solve the issue (at least in my test-repository) :/ @adrai the |
well I kinda assumed the problem was the empty |
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. |
💥 Regression Report
Prior to version 21.5.0 yarn berry's PnP did work just as expected in a nextjs project.
It seems that #1681 somehow confuses the yarn loader, as it always says:
(I've tried the latest version as well, no luck)
Last working version
Worked up to version: 21.4.2
Stopped working in version: 21.5.0
To Reproduce
Steps to reproduce the behavior:
use i18next in a yarn PnP backed nextjs project.
I also made an example repository here: https://github.com/opencreek/i18next-yarn-bug
It's based on the nextjs typescript starter, it should be a (fairly) minimal example of the behaviour
Expected behavior
No Importing errors, while building / running the dev server
Your Environment
The text was updated successfully, but these errors were encountered: