Challenge
After updating from Svelte version 3.0.0 to the latest using npm i svelte@latest
, I encountered an issue where my application would not run and constantly displayed the following error:
[!] Error: Package subpath './compiler.js' is not defined by "exports" in /home/blub/coding/bla/node_modules/svelte/package.json Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './compiler.js' is not defined by "exports" in /home/blub/coding/bla/node_modules/svelte/package.json
Tried Solutions
I attempted to update rollup-plugin-svelte to version 5.2.0, but unfortunately that did not resolve the issue. Is there a need to upgrade any other dependencies along with this? Below are the current dependencies listed:
"devDependencies": {
"node-sass": "^4.12.0",
"npm-run-all": "^4.1.5",
"rollup": "^2.44.0",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-livereload": "^1.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-svelte": "^5.2.3",
"rollup-plugin-terser": "^4.0.4",
"svelte": "^3.37.0",
"svelte-preprocess-sass": "^0.2.0"
},
"dependencies": {
"axios": "^0.19.0",
"sirv-cli": "^0.4.4"
},