-
Notifications
You must be signed in to change notification settings - Fork 303
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
Cant get this working in Svelte Kit #96
Comments
Yep I have the same problem ;( |
Yep, same here
|
It's very frustrating - this looks like a fantastic editor, and it's written using Svelte - but trying to consume it directly from SvelteKit seems to be impossible. Even more frustrating is if you drop the source directly into the "lib" folder of a brand new SvelteKit project it all just works. Using the "package" feature of SvelteKit then makes a version that can be imported into other SvelteKit projects, so maybe using this as a packaging option would be an idea? |
Would also love to see this issue resolved, just upgraded my project to SvelteKit and now it seems like my editor doesn't work. |
Hi, I encounter the same problem here. I think I know what the source of the problem. Svelte Kit currently work on ESM. So importing cjs module with default import will break the svelte-kit
|
You have a typo. This is what you're looking for: You need to install |
Oh I make a mistake, I suddenly edited the import string. OK I'll try again |
Now stuck on this The requested module '/node_modules/.pnpm/unist-util-visit@2.0.3/node_modules/unist-util-visit/index.js?v=421b96cf' does not provide an export named 'default' Don't know where this module is imported, maybe I miss something. |
Yeah, I had to upgrade it to |
Which module you upgraded to |
|
Ok, thanks for the advice @benwoodward 😊 |
Re-posting original issue due to thread pollution: Hi I can't seem to get this working in Svelte Kit. Like all my other modules:
And If I turn SSR off I get:
Has anyone gotten this working yet? |
Hi @MarcGodard, sorry for make pollution to your thread. I think you have 2 issue here.
This caused by ESM problem like we discuss above. Remark parse is cjs module. It cannot work on vite (svelte-kit). So to make this package work we must change how the way cjs module imported or use the esm module version of the module (if exists). Second
May be this is different Issue. I cannot reproduce this in my project even I turn off ssr mode. |
In an SSR environment, I can't even start editor
|
Hi all, thanks for providing so much context for this issue! I have provided an example here, which is built with the latest version of SvelteKit (with tag |
Does this still work? Vite is always surprising on this unstable phase. I'm getting: for modules
I'll try the minimum repo soon, but I'll put it here if someone else is facing it.
|
I can't get that example working in my code either. When i build the app, it shows up (not in development at all). When i type something, i get these errors (useless errors because its built):
When i run in dev (and nothing shows up):
|
Does anyone have any suggestions on how to fix this? It seems there is a lot of interest in using this with Sveltekit. |
anyone ever able to get this working? Im having the same issue module not found with the lodash.debounce. |
Had the same problem while importing
So I had to include them on the pre-bundle with the {
optimizeDeps: {
include: ["debug", "mdurl", "highlight.js"]
}
} |
There seems to be a few issues here:
|
@benmccann Thanks for the summary! Based on the above feedback from our users, I think one of the most likely reasons may be the version dependency. The The versions we used are mainly outdated, for example, So in the next minor release, I think it might be a better choice to bundle all the dependencies into it, so there won't be any version inconsistency problems for our users. Already working on it, will be done in a few weeks |
Thanks for providing the guide. It's because the latest |
Thanks everyone. I think it is invalid packaging too. |
Hi all, sorry for the late fix. Could you please help to give the latest version a try? |
For me, I got it working using the vanilla JS config and adding bytemd to |
Also added a Sveltekit example here: https://github.com/bytedance/bytemd/tree/main/examples/svelte |
After upgrading to |
@pd4d10 Your example works as standalone, but when I add
and put your index.js as a route in an existing code, I get
I am not understanding what is different in your example and in my code. Any idea what I may have missed? |
Could you please provide a minimal reproduction repo? |
I will test this this coming weekend and close issue if resolved. Thanks for the fix. |
This issue is stale because it has been open for 60 days with no activity. |
While it works in development, I cannot start the deployed app, using MeteorJS. I think it is related to this issue.
|
Hi I can't seem to get this working in Svelte Kit.
Like all my other modules:
And If I turn SSR off I get:
Has anyone gotten this working yet?
The text was updated successfully, but these errors were encountered: