-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Nextjs error - SyntaxError: Named export 'saveAs' not found. The requested module 'file-saver' is a CommonJS module #58
Comments
@stefan-krajnik how to can you get this error? can you share a repo? |
@hunghg255 I don't have it anywhere publicly available, but it's easy to reproduce. If you import the editor anywhere where it runs on server, e.g.
|
The issue is here
I'd recommend either to use another package or import the package asynchronously when save is triggered So here reactjs-tiptap-editor/src/extensions/ExportWord/ExportWord.ts Lines 65 to 67 in 5b0b4aa
I'd do something like
You can do the same even if you decide to use different library for saving files, it doesn't need to be part of the main bundle |
oke, I got it, I will check late-night |
@stefan-krajnik FYI: I resolved this bug, |
@hunghg255 any progress? |
Using dynamic import is not a solution, I need to be able to import extentions to generate html from JSON on server.
The text was updated successfully, but these errors were encountered: