-
Notifications
You must be signed in to change notification settings - Fork 81
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 interop Nextjs #108
Comments
Hi 👋🏻 Can you please provide a reproduction case? |
Another problem with Next.js 13 is now
So sure, it's related to react-merge-refs, but it's this module calling it. I can't find a solution to be able to compile |
Experiencing the same issue in Next.js 13. |
hey im also facing same error
|
I am facing the same problem. |
I'm experiencing the same issue in Nextjs 13 |
Facing the same issue in Next.JS 13
|
Fixed with: experimental.esmExternals: 'loose' in nextjs config file |
I found an alternative way so I could use the library https://kenneho.net/2022/09/03/resolving-error-err_require_esm-require-of-es-module-in-nextjs/ |
I had the same problem ([email protected], Next.js 13). It's now working. |
The same issue occurred for me. The version of react-merge-refs currently being used in the project appears to be 2.0.1. This library does not seem to support cjs from 2.0.0. 🤔 |
downgrading react merge refs as below fixed the issue for me in yarn.lock [email protected]: |
The Hopefully it fixes this issue 🙂 |
I'm using this library as part of my own library of shared components, which is imported into a Next.js app. This gives me an ESM error however:
Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
Anyone else experiencing similar problems? I find it quite hard to pinpoint the issue, but it seems that
import Sheet from "react-modal-sheet";
is importing it from"dist/index.js"
instead of"dist/react-modal-sheet.esm.js"
The text was updated successfully, but these errors were encountered: