Antigravity Svelte Extension Compatibility
Describe the bug
There is an error with the Google Antigravity editor
Error in svelte.config.js
Error: Cannot find module @rollup/rollup-darwin-arm64. 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.
Reproduction
- Install the new Google Antigravity editor
- Install svelte extension
- Open any svelte file
Expected behaviour
No error in @rollup/rollup-darwin-arm64
System Info
- OS: MacOSX Sequoia
- IDE: Google Antigravity 1.11.3
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
No response
This is typically because your dependencies are installed under an x64 environment(Rosetta), but your editor is running in Apple Silicon arm64. If it's really related to the editor. The error message would say it can't find the corresponding packaging for another architecture. You should check if the terminal app or the Node.js version manager you were using is running under Roesttea. You can see the discussion in #2278 for pointers.
This is typically because your dependencies are installed under an x64 environment(Rosetta), but your editor is running in Apple Silicon arm64. If it's really related to the editor. The error message would say it can't find the corresponding packaging for another architecture. You should check if the terminal app or the Node.js version manager you were using is running under Roesttea. You can see the discussion in #2278 for pointers.
Rosetta is not in use. Not that I'm aware of
This issue occurs specifically with Antigravity. Other applications like VSCode, Cursor, and Windsurf are functioning correctly.
@rollup/rollup-darwin-arm64 is the correct package for your OS. Can you check if the package is actually in your node_modules? If not, what is the package in the @rollup directory?
To be clear, there isn't really a thing we can "fix". This is a runtime error that comes from your svelte.config.js. And it's because of your preprocess setup. What I can do is help you find the problem with your setup.
I don't have any @rollup package in first level of node_modules
I think that's Antigravity Editor bug.
Package.json
{
"name": "dashboard",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint ."
},
"devDependencies": {
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.38.0",
"@internationalized/date": "^3.10.0",
"@lucide/svelte": "^0.554.0",
"@sveltejs/adapter-auto": "^7.0.0",
"@sveltejs/kit": "^2.47.1",
"@sveltejs/vite-plugin-svelte": "^6.2.1",
"@tailwindcss/forms": "^0.5.10",
"@tailwindcss/typography": "^0.5.19",
"@tailwindcss/vite": "^4.1.14",
"@tanstack/table-core": "^8.21.3",
"@types/d3-scale": "^4.0.9",
"@types/node": "^24",
"bits-ui": "^2.14.3",
"clsx": "^2.1.1",
"d3-scale": "^4.0.2",
"embla-carousel-svelte": "^8.6.0",
"eslint": "^9.38.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-svelte": "^3.12.4",
"formsnap": "^2.0.1",
"globals": "^16.4.0",
"layerchart": "2.0.0-next.27",
"mode-watcher": "^1.1.0",
"paneforge": "^1.0.2",
"prettier": "^3.6.2",
"prettier-plugin-svelte": "^3.4.0",
"prettier-plugin-tailwindcss": "^0.7.1",
"svelte": "^5.41.0",
"svelte-check": "^4.3.3",
"svelte-sonner": "^1.0.6",
"sveltekit-superforms": "^2.28.1",
"tailwind-merge": "^3.4.0",
"tailwind-variants": "^3.1.1",
"tailwindcss": "^4.1.14",
"tw-animate-css": "^1.4.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.1",
"vaul-svelte": "1.0.0-next.7",
"vite": "^7.1.10",
"vite-plugin-devtools-json": "^1.0.0"
}
}
It's not a direct dependency. So if you're using pnpm, it should be under node_modules/.pnpm
I added this setting to the settings.json, and the issue was resolved. { "svelte.language-server.runtime": "node", "svelte.plugin.svelte.compilerWarnings": { "a11y-media-has-caption": "ignore" } }
I added this setting to the settings.json, and the issue was resolved. { "svelte.language-server.runtime": "node", "svelte.plugin.svelte.compilerWarnings": { "a11y-media-has-caption": "ignore" } }
Nice, "svelte.language-server.runtime": "node" apparently fix the problem.
@brucesong08 Were you also only having the issue in Antigravity? Do you have the @rollup/rollup-darwin-arm64 package in your node_modules? Or maybe it actually is @rollup/rollup-darwin-x64?
@brucesong08 Were you also only having the issue in Antigravity? Do you have the
@rollup/rollup-darwin-arm64package in your node_modules? Or maybe it actually is@rollup/rollup-darwin-x64?
Yes, I'm sure the package is correct, and I've checked the node-modules/@rollup directory. The same project works fine on Windsurf.
@andremacola Where did you add this line? I don't have a settings.json file so created a new settings.json file at the root of the project and added this json config there, but the error is still there. I'm also using Antigravity editor and facing this issue in this editor only rest works fine.
.vscode/settings.json
here is my
{
"editor.rulers": [
100,
120,
140
],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": [
"javascript",
"typescript",
"svelte"
],
"typescript.format.enable": false,
"javascript.format.enable": false,
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"svelte.language-server.runtime": "node",
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode",
"editor.formatOnSave": true
}
}
Ok, I borrowed a MacBook to debug the problem, and I can reproduce the error. The underlying error is "not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?" This seems to be a Mac-only security measurement that prevents the Node.js version bundled in Antigravity from loading the rollup binary.
To workaround this, as mentioned by brucesong08, you can use the svelte.language-server.runtime config to use your own Node.js installation. Or if you aren't using vitePreprocess, you could also try to remove it from svelte.config.js.
Using dynamic-import to load vite-preprocess conditionally might also be a solution if you're not using style preprocess:
let vitePreprocess;
try {
vitePreprocess = await import('@sveltejs/vite-plugin-svelte').then((m) => m.vitePreprocess);
} catch (error) {
}
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors
preprocess: vitePreprocess?.(),
}
apparently something's going on at gemini-cli too
Having the issue too, seem to be the Antigravity issue
Same situation (Antigravity, arm64 architecture, nvm, tried node 20), but "svelte.language-server.runtime": "node" doesn't work for me. I have @rollup/rollup-darwin-arm64 in node_modules.
edit: node 24 worked, after npm update and restarting antigravity 🎉
You will need to restart the editor if you changed the svelte.language-server.runtime config.
TT Please see this issue @AntigravityTeamGoogle
That still did not fix it for me Only occurs in Antigravity, fine is VSCode + Cursor
Setup:
- M3 Pro
- npm 11.7.0
- node 22.17.1
- .vscode/settings.json: { "files.associations": { "*.css": "tailwindcss" }, "editor.rulers": [ 100, 120, 140 ], "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" }, "eslint.validate": [ "javascript", "typescript", "svelte" ], "typescript.format.enable": false, "javascript.format.enable": false, "[json]": { "editor.defaultFormatter": "vscode.json-language-features" }, "svelte.language-server.runtime": "node", "[svelte]": { "editor.defaultFormatter": "svelte.svelte-vscode", "editor.formatOnSave": true } }
What I tried:
- delete node_modules + package-lock.json
- tried npm i rollup/rollup-darwin-arm64
- tried npm cache clean --force
- tried npm update
- upgrading to node v24 as another user suggested and re-ran all steps
After each change:
- tried restarting Svelte Language Server
- tried restarting the Antigravity editor
Did all of those steps in any combination of order possible, still no luck.
By chance I solved issue somehow;
I uninstalled the Svelte for VS Code extension in Antigravity and reinstalled after having enabled Node v24
I added this setting to the settings.json, and the issue was resolved. { "svelte.language-server.runtime": "node", "svelte.plugin.svelte.compilerWarnings": { "a11y-media-has-caption": "ignore" } }
Nice,
"svelte.language-server.runtime": "node"apparently fix the problem.
Works for me, thank you
I added this setting to the settings.json, and the issue was resolved. { "svelte.language-server.runtime": "node", "svelte.plugin.svelte.compilerWarnings": { "a11y-media-has-caption": "ignore" } }
"svelte.language-server.runtime": "node"
this works for me too, thanks