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

208
Visualizações
Nuxt: Maximum call stack size exceeded when render dynamic imported component on server side

I'm using asyncData to fetch some content blocks from DB, after that I want to render each block using <component :is="block.component" but I'm getting Maximum call stack size exceeded. I've tried to use fetch with fetchOnServer: true option instead asyncData but error is the same.

P.S It works using fetch with fetchOnServer: false but I need to render on server side.

In console I'm getting the message: Cannot stringify a function component

<template>
  <div>
    <div v-for="block in blocks" :key="block._id">
      <component :is="block.component" :content="block.content"></component>
    </div>
  </div>
</template>

<script>
import { fetchMainBlocks } from "../services/main.js";

export default {
  async asyncData() {
    const response = await fetchMainBlocks();

    const blocks = response.map(block => {
      return {
        ...block,
        component: () => import(`../components/main/${block.template}/${block.ver}.vue`)
      }
    });

    return {
      blocks
    }
  }
about 4 years ago · Juan Pablo Isaza
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