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.

Access `$nuxtI18nSeo` through @nuxtjs/composition-api

See original GitHub issue

Hey guys,

I am trying to access $nuxtI18nSeo from the setup method using useContext from nuxt composition API but I can’t find a way to access it.

Any guesses?

UPDATE: I managed to access it with the following code… will that to what it’s supposed to do? Also is that the “correct” way to do that?

const { app: { i18n } } = useContext() 
const seo = i18n.vm.$nuxtI18nSeo()

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
aaronhuisingacommented, Sep 10, 2020

@bissolli I’m stuck with this same issue. For some reason, however, the solution you posted using root.$nuxtI18nSeo() doesn’t work for us. We get a “Cannot read property ‘req’ of undefined” error from .nuxt/nuxt-i18n/plugin.routing.js on line 167.

Did you run into this same issue, or did it just work for you right away? We might just temporarily ditch the SEO tags for now as we move to composition API until we can get it all working.

0reactions
rchlcommented, Sep 8, 2021

True. There is no composition API added yet but it doesn’t crash at least.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access $nuxtI18nSeo through @nuxtjs/composition-api #873
I am trying to access $nuxtI18nSeo from the setup method using useContext from nuxt composition API but I can't find a way to...
Read more >
Nuxt Composition API
Vue 3 Composition API. Get all the Composition API features in Nuxt 2. ; SSR features. Additional helpers to interact with SSR. ;...
Read more >
nuxt-i18n | Yarn - Package Manager
Integration with vue-i18n · Automatic routes generation and custom paths · Search Engine Optimization · Lazy-loading of translation messages · Redirection based on ......
Read more >
Nuxt Composition API - Vue School Blog
In this article I want to introduce @nuxtjs/composition-api module that ... Now we can access it through $http property of Nuxt Context.
Read more >
vue.js - Access Nuxt custom plugin from Composition API
I was able to get this to work via the Nuxt useContext() method: import { useContext } from '@nuxtjs/composition-api' export default ...
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