-
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
No provided export named 'Delta' breaking Vite build #120
Comments
Exactly the same issue here -- spent some energy looking at this a few months back (and here again today) Things I've tried (latest SvelteKit as far as I know).
So far in every case I've chosen to defer this and build without the toolbar for now. Seems like at some point Vite/SvelteKit/Typewriter will converge to interop again -- all are great products more on the leading edge of progress, which has this side-effect of tricky build processes and compatibility. If anyone has any tricks though beyond the above, I'm happy to try something out, and LMK @JacobL84 if you get anywhere too! |
Similar issue here, but in my case I'm not using the toolbar but importing Line 1 in 1a55ea1
Fixed my import by transforming: import { TextDocument, Delta, Typeset, docToHTML } from 'typewriter-editor'; to import { Typeset, docToHTML } from 'typewriter-editor';
import { TextDocument } from '@typewriter/document';
import { Delta } from '@typewriter/delta'; |
I just stumbled across this issue by chance and I remember that I had a similar issue in a different project (so not really sure, if this is the same issue here). First of all, this issue occurs, when a dependency (let's call it A) of a project is provided as EMS modules, but imports another commonjs library (let's call it B). However, you can tell vite to include them, as explained here: https://vitejs.dev/config/dep-optimization-options.html#optimizedeps-exclude The following config worked in the case of my problem
|
Typewriter-document has been changed to commonjs modules now. Does this fix this problem? |
No. I think its a Typescript/vite issue. On day three of trying everything to get this to work. Does anyone have a solution yet to get this working with sveltekit. |
While attempting to add typewriter-editor to my adapter-static SvelteKit project, I wrote the following import statements in my src/routes/+page.svelte file's <script> block:
The first two lines behave as normal and I can utilize them fine. The third line however, breaks my build with the following console error:
SyntaxError: The requested module '/node_modules/@typewriter/delta/dist/index.js?v=867ac9e3' does not provide an export named 'Delta' (at VM208 Line.js:1:10)
This appears to be similar to #101, however my build tool is Vite instead of Webpack. I am unable to determine what the equivalent fix would be in Vite despite consulting numerous other troubleshooting resources. If @jacwright could provide any insight on this it would be greatly appreciated.
The text was updated successfully, but these errors were encountered: