-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
NPM modules incorrectly interpreted as CJS #680
Comments
jaywcjlove
added a commit
that referenced
this issue
Oct 25, 2024
As mentioned in #613 (comment), I have found this to be a cause of #613 (and probably #216 too in some cases). The fix in #692 of adding |
jaywcjlove
added a commit
that referenced
this issue
Dec 16, 2024
jaywcjlove
added a commit
that referenced
this issue
Dec 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As you can see here or here the
package.json
could mislead Node.js into load index.js as ESM which triggers the following error:I cannot provide a reproduction but it happens in Vite when rendering SSR (I know this is not expected). Seems like affects other packages. This snippet also fails in SSR:
React fails to render it because it is a not expected object (we are getting the CJS module instead of the render function. As a workaroung you can use
<CodeMirror.default>
and patch the package.json for the packages you need.The text was updated successfully, but these errors were encountered: