-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
VS Code: The Svelte server crashed 5 times. Cannot find module @rollup/rollup-win32-x64-msvc #11679
Comments
Did you look into whether you're experiencing the npm bug mentioned in the error message? Otherwise, we'll need a reproduction. If this is due to Rollup not being able to find one of its dependencies, that would be unrelated to Svelte. |
Sounds related to #11667, maybe try the suggestions in that linked issue |
Another similar error sveltejs/language-tools#2341. This error is likely because your node.js installation and VSCode are running on different architectures. |
Yes, I explored it. I am posting here because it lead nowhere.
Apologies for posting in the wrong place.
I tried all of these before posting here. I should have mentioned it. My
Also, my VS Code is 64-bit. The solutions you linked address the 32-bit vs 64-bit mismatch, which is not the case for me. What's weirder is that everything was running fine before. All the problems started when I switched from Svelte 3 to the latest of Svelte 4. I deleted Here are my files: package.json {
"name": "app",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"page": "^1.11.6",
"svelte": "^4.2.16",
"tabulator-tables": "^6.2.1",
"vite": "^5.2.11"
}
} svelte.config.js import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
export default {
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
// for more information about preprocessors
preprocess: vitePreprocess(),
} vite.config.js import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
server: {
proxy: {
"/public": "http://localhost:3000",
"/auth": "http://localhost:3000",
"/api": "http://localhost:3000",
},
},
esbuild: {
drop: ["console", "debugger"],
},
}); jsonconfig.json {
"compilerOptions": {
"moduleResolution": "Node",
"target": "ESNext",
"module": "ESNext",
/**
* svelte-preprocess cannot figure out whether you have
* a value or a type, so tell TypeScript to enforce using
* `import type` instead of `import` for Types.
*/
"importsNotUsedAsValues": "error",
"isolatedModules": true,
"resolveJsonModule": true,
/**
* To have warnings / errors of the Svelte compiler at the
* correct position, enable source maps by default.
*/
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
/**
* Typecheck JS in `.svelte` and `.js` files by default.
* Disable this if you'd like to use dynamic types.
*/
"checkJs": false // true
},
/**
* Use global.d.ts instead of compilerOptions.types
* to avoid limiting type declarations.
*/
"include": ["src/**/*.js", "src/**/*.svelte"] // "src/**/*.d.ts",
} |
UPDATE Running this command:
Gave me this error:
I guess this must be the problem? But how did it work beforehand? I am using WSL on Windows. |
Rollup only added the native module recently. So it is most likely because you updated to the latest version of rollup as well. If you're using WSL, you should use the WSL extension. That should make non-ui stuff to run on Linux a |
Rollup only added the native module recently. So it is most likely because you updated to the latest version of rollup as well. If you're using WSL, you should use the WSL extension and open the workspace in WSL. That should make non-ui stuff run on Linux and that should also solve the problem. |
@jasonlyu123 Interesting... I navigated through the WSL terminal to the directory, and opened it with:
This prompted me to reinstall all the VS Code extensions for Windows, for Linux as well, specifically the I don't know how, but the whole VS Code seems to have switched to a WSL version as new features suddenly appeared... I no longer get the error and Prettier works as expected. Thanks for the help! |
Describe the bug
Happens when saving and Prettier tries to format the code.
Reproduction
No reproduction.
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: