-
Notifications
You must be signed in to change notification settings - Fork 95
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Error: Cannot find module 'svelte/compiler' (v 4.2.0) #9
Comments
But it works when |
As svelte is now a peer dependency you will need svelte installed manually. Looks like maybe prettier picks up the globally installed version of prettier-plugin-svelte which stops us from being able to pick up the locally installed svelte version. Will probably be able to add something that detects if there is a locally installed version of prettier-plugin-svelte and use that instead |
I run into that issue as well, related to a monorepo. I have prettier installed in the repository root, but the Svelte code is in |
Same error in a sapper-template repository. Run with Gitpod: https://gitpod.io/#https://github.com/crstnio/sapper/pull/1 In console, type: Edit: I don't know what has changed, but after adding some scripts to the PR and noticed that Svelte files were rewritten during |
I was having the exact same problem, the solution for me was installing svelte as a dependency instead of a peerDependency, after that, prettier cli was working flawlessly |
* feat: add mdp-meta pages generation * fix: svelte dependency Rollup was throwing an error `[!] Error: Cannot find module 'svelte/compiler'` (sveltejs/prettier-plugin-svelte#9) * feat: add date to metadata * fix: allow dashes in markdown filenames * fix: typo
Any updates or a workaround on this issue? I'm also encountring the same problem in a monorepo I'm trying to setup. |
@Paultje52 updating the svelte extension in vs code worked for me |
I'm facing the same issue. I have tried putting |
Running into this in 2024 still. |
After update the plugin I got an error "Error: Cannot find module 'svelte/compiler'"
I installed the plugin as a global and as a local lib
Svelte installed only as a local lib
The text was updated successfully, but these errors were encountered: