{"id":561,"hash":"420936e835aa98aca9e4f186ce8dcaf98d4ab255f8d18dea51c1525b709d514b","pattern":"Build error after updating Svelte: Package subpath &#39;./compiler.js&#39; is not defined by &quot;exports&quot;","full_message":"Problem\nI was on Svelte version 3.0.0 and used npm i svelte@latest to update to the most recent version. Now I can't get the app to run, I always get this errror:\n\n[!] Error: Package subpath './compiler.js' is not defined by \"exports\" in /home/blub/coding/bla/node_modules/svelte/package.json\nError [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './compiler.js' is not defined by \"exports\" in /home/blub/coding/bla/node_modules/svelte/package.json\n\nFailed Solutions\nI also updated rollup-plugin-svelte to version 5.2.0, but that did not help. Are there any other dependencies I also have to update? Here is a list of my dependencies:\n\n  \"devDependencies\": {\n    \"node-sass\": \"^4.12.0\",\n    \"npm-run-all\": \"^4.1.5\",\n    \"rollup\": \"^2.44.0\",\n    \"rollup-plugin-commonjs\": \"^10.0.0\",\n    \"rollup-plugin-livereload\": \"^1.0.0\",\n    \"rollup-plugin-node-resolve\": \"^5.2.0\",\n    \"rollup-plugin-svelte\": \"^5.2.3\",\n    \"rollup-plugin-terser\": \"^4.0.4\",\n    \"svelte\": \"^3.37.0\",\n    \"svelte-preprocess-sass\": \"^0.2.0\"\n  },\n  \"dependencies\": {\n    \"axios\": \"^0.19.0\",\n    \"sirv-cli\": \"^0.4.4\"\n  },","ecosystem":"npm","package_name":"npm","package_version":null,"solution":"This issue is due to a breaking change of svelte v3.29.5. So if you want to use this version you will also need to update rollup-plugin-svelte to at least v6.1.1:\n\nnpm i -D rollup-plugin-svelte@6.1.1\n# or with yarn\nyarn add -D rollup-plugin-svelte@6.1.1","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/66965954/build-error-after-updating-svelte-package-subpath-compiler-js-is-not-define","votes":19,"created_at":"2026-04-19T04:51:20.930403+00:00","updated_at":"2026-04-19T04:51:20.930403+00:00"}