DerYeger / yeger

Monorepo for @yeger/ NPM packages
MIT License
306 stars 23 forks source link

bug: TypeError: Cannot read properties of null (reading 'emitsOptions') #286

Closed joaoggnogueira closed 4 months ago

joaoggnogueira commented 4 months ago

Affected Packages

Description

Plugin not working into Nuxt 3.11.2

// plugins/vue-masonry-wall.ts
import MasonryWall from '@yeger/vue-masonry-wall'

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(MasonryWall)
})
      <masonry-wall :items="filtered_talents" :ssr-columns="ssrColumns" :gap="gap">
        <template #default="{ item }">
            <nuxt-link :to="{ name: 'talents-profile', params: { talent_id: item._id } }" target="self">

            </nuxt-link>
        </template>
      </masonry-wall>

I'm getting this following error when executed into SSR mode

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'emitsOptions')
    at shouldUpdateComponent (chunk-6LRXACK2.js?v=0dcd5804:2526:27)
    at updateComponent (chunk-6LRXACK2.js?v=0dcd5804:7392:9)
    at processComponent (chunk-6LRXACK2.js?v=0dcd5804:7340:7)
    at patch (chunk-6LRXACK2.js?v=0dcd5804:6795:11)
    at patchBlockChildren (chunk-6LRXACK2.js?v=0dcd5804:7185:7)
    at patchElement (chunk-6LRXACK2.js?v=0dcd5804:7077:7)
    at processElement (chunk-6LRXACK2.js?v=0dcd5804:6926:7)
    at patch (chunk-6LRXACK2.js?v=0dcd5804:6783:11)
    at ReactiveEffect.componentUpdateFn [as fn] (chunk-6LRXACK2.js?v=0dcd5804:7553:9)
    at ReactiveEffect.run (chunk-6LRXACK2.js?v=0dcd5804:435:19)

Reproduction

"dependencies": { .... "@yeger/vue-masonry-wall": "^5.0.10", .... "nuxt": "^3.11.2", .... "vue": "^3.4.27", .... }

Additional context

No response

Preferences

DerYeger commented 4 months ago

Please provide a minimal reproduction using StackBlitz or a similar tool.

joaoggnogueira commented 4 months ago

I solved the problem. The nuxt-link failed to find the path, when it failed into the plugin template, the entire page crashes. I don't kwon if it's exactly an Vue-Masonry problem