Uncaught (in promise) Maximum recursive updates exceeded. This means you h …

Forums Vue 3 Migration Errors Uncaught (in promise) Maximum recursive updates exceeded. This means you h …

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #122263
    albanaavdiu
    Participant

    Error : Uncaught (in promise) Maximum recursive updates exceeded. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.

    Solution :
    <v-img
    :src=”require(‘@/assets/logo/eliflogo.svg’)”
    class=”my-3″
    contain
    max-height=”100″
    ></v-img>

    When require() is used directly in the template, Vue might treat it as a reactive dependency, causing the render process to re-evaluate every time, leading to recursive updates.
    Since you’re using Vite, you should directly import the asset at the top of the script section, instead of using require().

    <template>
    <v-img
    :src=”logoSrc”
    class=”my-3″
    contain
    max-height=”100″
    ></v-img>
    </template>

    <script>
    import logo from ‘@/assets/logo/eliflogo.svg’; // ES module import

    export default {
    data() {
    return {
    logoSrc: logo // Use the imported image
    }
    }
    }
    </script>

     

    • This topic was modified 7 months, 4 weeks ago by albanaavdiu.
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.