You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
┌ Welcome to SvelteKit!
│
◇ Which Svelte app template?
│ Skeleton project
│
◇ Add type checking with TypeScript?
│ Yes, using TypeScript syntax
│
◇ Select additional options (use arrow keys/space bar)
│ none
│
└ Your project is ready!
install the dependencies
open the project in vscode with Svelte for VS Code enabled
Expected behaviour
The extension should work perfectly fine
System Info
OS: Windows 10
IDE: VSCode v1.88.1
CPU architecure: ia32
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
Heres the log for the first error since all three errors have the same value:
Initialize language server at file:///c%3A/Users/xxxx/Desktop/projects/batu
Initialize new ts service at c:/Users/xxxx/Desktop/projects/batu/tsconfig.json
Trying to load configs for c:/Users/xxxx/Desktop/projects/batu
Error while loading config at c:\Users\xxxx\Desktop\projects\batu\svelte.config.js
Error: Cannot find module @rollup/rollup-win32-x64-msvc. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
at requireWithFriendlyError (C:\Users\xxxx\Desktop\projects\batu\node_modules\.pnpm\rollup@4.14.3\node_modules\rollup\dist\native.js:59:9)
at Object.<anonymous> (C:\Users\xxxx\Desktop\projects\batu\node_modules\.pnpm\rollup@4.14.3\node_modules\rollup\dist\native.js:68:76)
... 2 lines matching cause stack trace ...
at Module.load (node:internal/modules/cjs/loader:1126:32)
at Module._load (node:internal/modules/cjs/loader:967:12)
at c._load (node:electron/js2c/node_init:2:13672)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:171:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
[cause]: Error: Cannot find module '@rollup/rollup-win32-x64-msvc'
Require stack:
- C:\Users\xxxx\Desktop\projects\batu\node_modules\.pnpm\rollup@4.14.3\node_modules\rollup\dist\native.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1084:15)
at Module._load (node:internal/modules/cjs/loader:929:27)
at c._load (node:electron/js2c/node_init:2:13672)
at Module.require (node:internal/modules/cjs/loader:1150:19)
at require (node:internal/modules/cjs/helpers:119:18)
at requireWithFriendlyError (C:\Users\xxxx\Desktop\projects\batu\node_modules\.pnpm\rollup@4.14.3\node_modules\rollup\dist\native.js:41:10)
at Object.<anonymous> (C:\Users\xxxx\Desktop\projects\batu\node_modules\.pnpm\rollup@4.14.3\node_modules\rollup\dist\native.js:68:76)
at Module._compile (node:internal/modules/cjs/loader:1271:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1326:10)
at Module.load (node:internal/modules/cjs/loader:1126:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\xxxx\\Desktop\\projects\\batu\\node_modules\\.pnpm\\rollup@4.14.3\\node_modules\\rollup\\dist\\native.js'
]
}
}
Found svelte.config.js but there was an error loading it. Using https://github.com/sveltejs/svelte-preprocess as fallback
SnapshotManager File Statistics:
Project files: 9
Svelte files: 1
From node_modules: 0
Total: 9
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
Error: Cannot find module @rollup/rollup-win32-x64-msvc. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
at requireWithFriendlyError (C:\Users\xxxx\Desktop\projects\batu\node_modules\.pnpm\rollup@4.14.3\node_modules\rollup\dist\native.js:59:9)
at Object.<anonymous> (C:\Users\xxxx\Desktop\projects\batu\node_modules\.pnpm\rollup@4.14.3\node_modules\rollup\dist\native.js:68:76)
... 2 lines matching cause stack trace ...
at Module.load (node:internal/modules/cjs/loader:1126:32)
at Module._load (node:internal/modules/cjs/loader:967:12)
at c._load (node:electron/js2c/node_init:2:13672)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:171:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
[cause]: Error: Cannot find module '@rollup/rollup-win32-x64-msvc'
Require stack:
- C:\Users\xxxx\Desktop\projects\batu\node_modules\.pnpm\rollup@4.14.3\node_modules\rollup\dist\native.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1084:15)
at Module._load (node:internal/modules/cjs/loader:929:27)
at c._load (node:electron/js2c/node_init:2:13672)
at Module.require (node:internal/modules/cjs/loader:1150:19)
at require (node:internal/modules/cjs/helpers:119:18)
at requireWithFriendlyError (C:\Users\xxxx\Desktop\projects\batu\node_modules\.pnpm\rollup@4.14.3\node_modules\rollup\dist\native.js:41:10)
at Object.<anonymous> (C:\Users\xxxx\Desktop\projects\batu\node_modules\.pnpm\rollup@4.14.3\node_modules\rollup\dist\native.js:68:76)
at Module._compile (node:internal/modules/cjs/loader:1271:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1326:10)
at Module.load (node:internal/modules/cjs/loader:1126:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\xxxx\\Desktop\\projects\\batu\\node_modules\\.pnpm\\rollup@4.14.3\\node_modules\\rollup\\dist\\native.js'
]
}
}
Node.js v18.18.2
[Info - 1:30:09 AM] Connection to server got closed. Server will restart.
true
The text was updated successfully, but these errors were encountered:
This error is because the vite-preprocessor from your svelte.config.js loaded vite and then rollup. The unhandled promise is probably out of our control and we can't handle it without catching all the unhandled promise rejection, which hides problems so I am not sure if this is what we want to do.
As for the error itself, this sounds like your node.js installation is in 32-bit but your VSCode is in 64-bit. You install the dependencies with 32-bit node.js but the VSCode uses its bundled 64-bit node.js which requires @rollup/rollup-win32-x64-msvc instead of @rollup/rollup-win32-ia32-msvc. Can you check if this is the case? If it is, try reinstalling 64-bit node.js and reinstall the dependencies.
Oops, looks like I have installed the wrong version of NodeJS.
While my VSCode is x64, my NodeJS is running on ia32. After reinstalling the correct version, quick run of the reproduction solved the issue.
Thanks @jasonlyu123 for the insight
Describe the bug
VSCode extension crashed: The Svelte server crashed 5 times in the last 3 minutes. The server will not be restarted.
Reproduction
Create svelte project: npm create svelte@latest project
┌ Welcome to SvelteKit!
│
◇ Which Svelte app template?
│ Skeleton project
│
◇ Add type checking with TypeScript?
│ Yes, using TypeScript syntax
│
◇ Select additional options (use arrow keys/space bar)
│ none
│
└ Your project is ready!
install the dependencies
open the project in vscode with Svelte for VS Code enabled
Expected behaviour
The extension should work perfectly fine
System Info
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
Heres the log for the first error since all three errors have the same value:
The text was updated successfully, but these errors were encountered: