Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with VueJS+InertiaJS SSR #145

Open
MohammadZarifiyan opened this issue Jul 17, 2023 · 0 comments
Open

Not working with VueJS+InertiaJS SSR #145

MohammadZarifiyan opened this issue Jul 17, 2023 · 0 comments

Comments

@MohammadZarifiyan
Copy link

I have the following page but when i use vue-lazy-hydration like this:

<div class="h-full overflow-y-auto" scroll-region>
    <LazyHydrate when-idle>
        <Ads />
    </LazyHydrate>
    <LazyHydrate never>
        <Header />
    </LazyHydrate>
    <Backoff />
    <Sidebar />
    <slot />
    <LazyHydrate when-idle>
        <Footer />
    </LazyHydrate>
</div>

The following error happens:

[Vue warn]: Property "$listeners" was accessed during render but is not defined on instance.
[Vue warn]: Property "$scopedSlots" was accessed during render but is not defined on instance.
[Vue warn]: Unhandled error during execution of render function 
  at <Anonymous when-idle="" >
TypeError: h is not a function
    at Proxy.render (/home/mohammad/PhpstormProjects/mymember/node_modules/vue-lazy-hydration/dist/LazyHydrate.js:165:18)
    at renderComponentRoot (/home/mohammad/PhpstormProjects/mymember/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:891:44)
    at renderComponentSubTree (/home/mohammad/PhpstormProjects/mymember/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:263:51)
    at renderComponentVNode (/home/mohammad/PhpstormProjects/mymember/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:188:16)
    at ssrRenderComponent (/home/mohammad/PhpstormProjects/mymember/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:624:12)
    at /home/mohammad/PhpstormProjects/mymember/public/js/ssr.js:2:1601827
    at renderComponentSubTree (/home/mohammad/PhpstormProjects/mymember/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:254:17)
    at renderComponentVNode (/home/mohammad/PhpstormProjects/mymember/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:188:16)
    at ssrRenderComponent (/home/mohammad/PhpstormProjects/mymember/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:624:12)
    at /home/mohammad/PhpstormProjects/mymember/public/js/ssr.js:2:1661761

Package.json:

VueJS: ^3.2.37
@vue/server-renderer: ^3.2.37
vue-lazy-hydration: ^2.0.0-beta.4
@inertiajs/inertia: ^0.11.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant