-
Notifications
You must be signed in to change notification settings - Fork 107
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
Suddenly getting Error: Cannot find module 'prismjs/components/prism-css'
with SvelteKit
#484
Comments
Given that this only happens in prod and not in dev, i have to conclude that this is because the prismjs transitive dep doesnt get bundled for serverless rendering another bug to file for sveltejs/kit#3535 |
i think this is the offending line
|
trying to solve it by installing update: didnt work |
was able to repro on a clean sveltekit install geoffrich/sveltekit-satori-mdsvex-test#1 |
Yes same issue on codingcat rewrite. For now I am manually importing to at least get most pages working.
|
another related bug: tried to solve this problem by swapping out the syntax highlighter: but the dynamic import and error is still happening. i suspect because even tho the highlighter is swapped out, the metadata isnt
|
I have the same issue with an Astro project.
When I change my app from SSR to Static Rendering, prism works as intended, it seems. |
i dont have a repro anymore but for future devs reading this, check out swyxkit. open your own issues with yoru own repro |
i moved swyxkit off of esbuild recently (due to netlify issues) and found that all my page renders with code samples were failing (https://swyxkit.netlify.app/welcome now 404's because i did clumsy error handling) due to this new error:
i dont have prismjs as a dep so actually took a bit of digging (
npm ls prism-svelte
) to figure out that it was mdsvex.i dont know the direct cause yet but just filing an issue for others to find
The text was updated successfully, but these errors were encountered: