-
Notifications
You must be signed in to change notification settings - Fork 536
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
Regression: @primer/react is depends on esm only module @github/combobox-nav #2245
Comments
I can verify that I am experiencing the same issue |
Hi, thanks for the report. It looks like we'll have to make some upstream changes in several dependencies:
Unfortunately that's a slower process than the fix for #2238 and may take some time. In the meantime, I would recommend staying locked to version |
Looks like a few other primer related things might be an issue in next Portals create a
|
I have created a Next.js app using |
I haven't used this before, or tried to setup with primer, but it looks like there's a bit of nextjs specific tooling for handling these transforms. https://www.npmjs.com/package/next-transpile-modules that might be the best option temporarily if you need a CJS build of primer >= 35.6.0 |
Was the portal issue already a problem before the The second two issues are definitely new since the |
There is some resistance (Slack thread) from the @github/web-systems team to adding the CommonJS build to combobox-nav (github/combobox-nav#63) because they would rather not keep supporting a legacy system and instead focus on ESM. Not relevant to the other SSR issues Matt mentioned above, but crucial for this particular issue. |
Curious to know whether primer/react would work with just the esm build in next. |
I believe it would. I don't have any context to know if the non-esm versions are required elsewhere. If my understanding is correct, this should be broken for any users of Lines 7 to 33 in 1e860b0
|
Hi there! 👋 This should be addressed in latest ( Going to close this out as a result, feel free to comment and I can re-open if this is still an issue! |
Describe the bug
This is a similar problem to #2238. When I try to use the latest @primer/react in the Next.js app, I get the following error:
I am guessing that @github/combobox-nav is the ESM only module.
To Reproduce
Steps to reproduce the behavior:
Create Next.js + TypeScript app via create-next-app
Edit
package.json
as follows:Edit
pages/_app.tsx
as follows:Run
npm run build
commandExpected behavior
This error does not occur when using
@primer/react@35.5.0
, so I expect the latest version work as well.Screenshots
N/A
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: