Closed waza-ari closed 2 months ago
This must be related to https://github.com/sjdemartini/mui-tiptap/pull/259, attempting to fix https://github.com/sjdemartini/mui-tiptap/issues/256. Seems supporting both node and NextJS environments may not be possible due to ESM incompatibilities of the underlying mui packages (see https://github.com/sjdemartini/mui-tiptap/pull/258#issuecomment-2303068294). 😕
I can try to take a look later, and perhaps will just revert the recent change that forced the node env to use CJS, given NextJS's popularity. Perhaps the workaround on node could be to use require
instead of import
for mui-tiptap. Open to any suggestions about how best to support both NextJS and node!
Unfortunately I'm not much of an expert on those topics, so not much I can do in terms of suggestions I'm afraid. Happy to test something though if that can be of any help for you
one solution is to use downgraded version. I am using mui-tiptap@1.8.0. which seems to work with NextJS
@sourabhmandal I believe up until 1.9.5 should work on NextJS still, as the change I'm mentioning above was released in https://github.com/sjdemartini/mui-tiptap/releases/tag/v1.9.6. But I do plan to get NextJS compatibility working again.
Mentioned this in a different thread but including here too: yesterday @mui/icons-material
published a version that properly adds ESM support https://github.com/mui/material-ui/releases/tag/v6.1.0, so perhaps it's possible to get things working and avoid the issues I mentioned here https://github.com/sjdemartini/mui-tiptap/pull/258#issuecomment-2303068294.
Mentioned this in a different thread but including here too: yesterday
@mui/icons-material
published a version that properly adds ESM support https://github.com/mui/material-ui/releases/tag/v6.1.0, so perhaps it's possible to get things working and avoid the issues I mentioned here #258 (comment).
Still I am facing the issue in nextjs with typescript. Can you please let me know how to fix this error?
I have tried to implement all-in-one component from the example.
Version Details
@mohanlokesh pin the version to 1.9.5
, the breaking change was introduced with 1.10
..
@mohanlokesh pin the version to
1.9.5
, the breaking change was introduced with1.10
..
Got it! I was just wondering if there’s any update on a solution for the latest version. I’ve noticed that there have been about four releases since this issue was reported, and I'm also looking into MUI 6, which isn’t supported in the earlier versions.
There isn't an update yet that resolves things for NextJS. I'm currently planning to revert the change the added support for Node environments that use ts-node/esm (resolving https://github.com/sjdemartini/mui-tiptap/issues/256), in favor of bringing back NextJS support. Though I'd still ultimately like to support both, if possible—if anyone has suggestions to this end, please let me know.
@waza-ari @mohanlokesh I believe this should now be resolved in v1.12.0. Please give it a try and let me know if it works for you.
@sjdemartini yes it worked, thank you so much 🎁🎁🥳🥳🎂
@sjdemartini if you have any chance can you please check this issue? 265 I am also having the same issue on editor with drawer function. Link, Color Picker, and table options are not showing above the drawer or model.
Describe the bug
When building a NextJS project, the following error message appears since v1.10.0 (was working with v1.9.0, and pinning the version to v1.9.0 fixes the issue):
Expected behavior
I'm expecting to build my project after updating to v1.10.0
System (please complete the following information)
extensions
array used for the editor: