robinrodricks / vue3-touch-events

Simple touch events support for vue.js 3
MIT License
216 stars 27 forks source link

TypeError: Cannot read properties of undefined (reading 'getSSRProps') #18

Open aysiscore opened 1 year ago

aysiscore commented 1 year ago

I have installed the package on the client side and it works, but when I refresh the page I get an SSR error:

TypeError: Cannot read properties of undefined (reading 'getSSRProps') at ssrGetDirectiveProps (\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:974:42)

The import of the package and app.use(Vue3TouchEvents) does not cause the issue.

The error only appears when I add a directive to the DOM like <li v-touch:swipe.left="next" v-touch:swipe.right="prev">

How can this package be used with SSR?