question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

¿Support for SSR? (Server Side rendering)

See original GitHub issue

¿Will SSR be supported?

vue & vue-i18n version

Vue: 2.0.1 vue-i18n: 4.6.0

How i18n is begin applied:

import VueI18n from 'vue-i18n'

Vue.use(VueI18n);

// set locale data
Vue.config.lang = i18nData.language;
Vue.config.fallbackLang = i18nData.language;
Vue.locale(i18nData.language, i18nData.phrases);

// Development options
if (process.env.NODE_ENV == "development") {
    // i18n: track missing translations
    Vue.config.missingHandler = function (lang, missingPhrase) {
        ApiService._call('/translation/add-phrase', {phrase: missingPhrase, locale: lang});
    };
}

Error message:

TypeError: Cannot read property ‘dep’ of undefined at getDep (C:\app\node_modules\vue-i18n\dist\vue-i18n.common.js:199:26) at Config (C:\app\node_modules\vue-i18n\dist\vue-i18n.common.js:212:13) at plugin (C:\app\node_modules\vue-i18n\dist\vue-i18n.common.js:946:3) at Function.Vue.use (C:\app\node_modules\vue\dist\vue.common.js:3140:14) at Object.<anonymous> (vue_ssr_bundle:1576:16) at webpack_require (vue_ssr_bundle:21:30) at Object.<anonymous> (vue_ssr_bundle:58:14) at webpack_require (vue_ssr_bundle:21:30) at module.exports.Object.defineProperty.value (vue_ssr_bundle:41:18) at Object.<anonymous> (vue_ssr_bundle:44:10)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

12reactions
nopromcommented, Jul 16, 2017

Any progress on i18n with SSR?

6reactions
kazuponcommented, Apr 6, 2017

Ok! I’ll try to ready the Nuxt.js example later! 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server-Side Rendering - Vite
Vite provides built-in support for server-side rendering (SSR). The Vite playground contains example SSR setups for Vue 3 and React, which can be...
Read more >
Server-Side Rendering (SSR) - Vue.js
Server -rendered markup doesn't need to wait until all JavaScript has been downloaded and executed to be displayed, so your user will see...
Read more >
How to Enable Server-Side Rendering for a React App
In this tutorial, you will initialize a React app using Create React App and then modify the project to enable server-side rendering.
Read more >
Improve app performance with React server-side rendering
React server-side rendering offers performance benefits vs. client-side rendering. Learn about different React SSR frameworks.
Read more >
Server-side rendering - Apollo GraphQL Docs
Server -side rendering (SSR) is a performance optimization for modern web apps. ... You don't need to make any changes to your queries...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found