svelte-intl-precompile: failed to import "svelte-intl-precompile"

11:16:24 a.m. [vite] Error when evaluating SSR module /src/routes/+page.svelte: failed to import "svelte-intl-precompile"
|- Error [ERR_REQUIRE_ESM]: require() of ES Module /home/marcgodard/Documents/Github/swp-web/node_modules/svelte/src/runtime/store/index.js from /home/marcgodard/Documents/Github/swp-web/node_modules/precompile-intl-runtime/dist/commonjs/stores/dictionary.js not supported.
Instead change the require of index.js in /home/marcgodard/Documents/Github/swp-web/node_modules/precompile-intl-runtime/dist/commonjs/stores/dictionary.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/marcgodard/Documents/Github/swp-web/node_modules/precompile-intl-runtime/dist/commonjs/stores/dictionary.js:5:17)
    at Object.<anonymous> (/home/marcgodard/Documents/Github/swp-web/node_modules/precompile-intl-runtime/dist/commonjs/includes/loaderQueue.js:4:22)
    at Object.<anonymous> (/home/marcgodard/Documents/Github/swp-web/node_modules/precompile-intl-runtime/dist/commonjs/index.js:18:23)
    at async Promise.all (index 0)
    at async nodeImport (file:///home/marcgodard/Documents/Github/swp-web/node_modules/vite/dist/node/chunks/dep-a8e37fae.js:55947:17)
    at async ssrImport (file:///home/marcgodard/Documents/Github/swp-web/node_modules/vite/dist/node/chunks/dep-a8e37fae.js:55840:24)
    at async eval (/home/marcgodard/Documents/Github/swp-web/src/routes/+page.svelte:4:31)
    at async instantiateModule (file:///home/marcgodard/Documents/Github/swp-web/node_modules/vite/dist/node/chunks/dep-a8e37fae.js:55902:9)

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 17 (4 by maintainers)

Commits related to this issue

Most upvoted comments

v0.12.3 has fixed this. Try the new version and report if it works on your projects.

I have the same problem and still can’t upgrade to svelte 4 😦