__vite_ssr_import_1__.loadTranslations is not a function
See original GitHub issueHi, I’m running into issues with this error every time, not sure what’s wrong. I followed the README and the Multi-Page Example.
every time with hot reload will run into
__vite_ssr_import_1__.loadTranslations is not a function
TypeError: __vite_ssr_import_1__.loadTranslations is not a function
at load (__layout.svelte:11:26)
at load_node (file://home/tailwind-cms/node_modules/@sveltejs/kit/dist/chunks/index.js:1610:30)
at respond$1 (file://home/tailwind-cms/node_modules/@sveltejs/kit/dist/chunks/index.js:1812:21)
at async render_page (file://home/tailwind-cms/node_modules/@sveltejs/kit/dist/chunks/index.js:2003:19)
at async resolve (file://home/tailwind-cms/node_modules/@sveltejs/kit/dist/chunks/index.js:2159:10)
at async Object.handle (//Users/xintan/Workspace/Ailink/code/ailink-tailwind-cms/src/hooks:8:19)
at async respond (file://home/tailwind-cms/node_modules/@sveltejs/kit/dist/chunks/index.js:2123:20)
at async file://home/tailwind-cms/node_modules/@sveltejs/kit/dist/chunks/index.js:2461:24
then
Error when evaluating SSR module /src/lib/locale/index.js:
TypeError: Class extends value #<Object> is not a constructor or null
at Object.<anonymous> (/home/tailwind-cms/node_modules/sveltekit-i18n/dist/index.cjs:1:1446)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:201:29)
at ModuleJob.run (node:internal/modules/esm/module_job:175:25)
at async Loader.import (node:internal/modules/esm/loader:178:24)
at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
at async nodeImport (/home/tailwind-cms/node_modules/vite/dist/node/chunks/dep-f5552faa.js:60169:21)
here’s my Package file:
"devDependencies": {
"@sveltejs/adapter-auto": "next",
"@sveltejs/adapter-static": "^1.0.0-next.26",
"@sveltejs/kit": "next",
"autoprefixer": "^10.4.2",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-svelte3": "^3.2.1",
"postcss": "^8.4.5",
"prettier": "^2.4.1",
"prettier-plugin-svelte": "^2.4.0",
"svelte": "^3.44.3",
"tailwindcss": "^3.0.17"
},
"type": "module",
"dependencies": {
"@fontsource/fira-mono": "^4.5.0",
"@lukeed/uuid": "^2.0.0",
"cookie": "^0.4.1",
"sveltekit-i18n": "^2.0.0-rc.0"
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Always get "t" is not a function error · Issue #114 - GitHub
I created the il8n.js file. I then updated index.js to: import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; ...
Read more >React-i18next does not load translations on page reload
However if I reload the page I get this error. TypeError: i18n.changeLanguage is not a function. What could be the possibel cause of...
Read more >loadTranslations - Angular
Loading a new translation will overwrite a previous translation if it has the same MessageId . Note that $localize messages are only processed...
Read more >Add or Load Translations - i18next documentation
To an empty array if you do not want to load any namespaces (also not the default namespace: 'translation' ) or to an...
Read more >A Guide to React Localization with i18next | Phrase
Notice that <Header> is a class-based, not a functional, component. We'll cover how to localize both types of components a bit later.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Added temporary workaround in
sveltekit-i18n@2.0.0-rc.4
Ok, it seems like an error in bundler. I’ve reported this issue here: https://github.com/egoist/tsup/issues/567