Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

701
Visualizações
TypeError: _this.$content is not a function - Nuxt.js Content

I am trying to use Nuxt.js Content in my project. The problem is that when I try to use $content method in my project the TypeError: _this.$content is not a function occurs:

async fetch() {
  this.content = await this.$content('data').fetch()
},

I imported the @nuxt/content in Nuxt config and in typescript config.

nuxt.config.js

export default {
  modules: ['@nuxt/content']
}

tsconfig.json

{
  "compilerOptions": {
    "types": ["@nuxt/types", "@types/node", "@nuxt/content"]
  }
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Nuxt content v2 needs Nuxt3. If you're using Nuxt2, you should use the v1.

As stated at the end of this page: https://content.nuxtjs.org/get-started#render-pages

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda