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

[Vue warn]: A plugin must either be a function or an object with an "install" function. with ssr #15

Open
samehdoush opened this issue Aug 25, 2022 · 0 comments

Comments

@samehdoush
Copy link

samehdoush commented Aug 25, 2022

vite 3 + vue 3

ssr.js

import { createSSRApp, h } from 'vue';
import { renderToString } from '@vue/server-renderer';
import { createInertiaApp , Link} from '@inertiajs/inertia-vue3';
import createServer from '@inertiajs/server';
import PerfectScrollbar from 'vue3-perfect-scrollbar'
createServer((page) =>
    createInertiaApp({
   .............
        setup({ app, props, plugin }) {
            return createSSRApp({ render: () => h(app, props) })
                .use(plugin)
                .component('Link', Link)
                .use(PerfectScrollbar)
                .use(ZiggyVue, {
                    ...page.props.ziggy,
                    location: new URL(page.props.ziggy.location),
                });
        },
    })
);

alert console : [Vue warn]: A plugin must either be a function or an object with an "install" function.
[Vue warn]: Failed to resolve component: perfect-scrollbar
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
TypeError: Invalid value used as weak map key

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