You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hellow. when i run php artisan inertia:start-ssr command in my terminal the ssr server work fine but when i reload browser page this error was showed: TypeError: _ctx.$route is not a function at file:///I:/Work/Code/Web/Khyaboon/bootstrap/ssr/ssr.js:47628:20 at renderComponentSubTree (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:683:9) at renderComponentVNode (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:631:12) at ssrRenderComponent (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:86:10) at file:///I:/Work/Code/Web/Khyaboon/bootstrap/ssr/ssr.js:48349:13 at renderComponentSubTree (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:683:9) at renderComponentVNode (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:631:12) at renderVNode (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:743:14) at renderComponentSubTree (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:698:7) at renderComponentVNode (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:631:12)
and here is my app.js
import "./bootstrap";
import "../css/app.css";
import { createApp, h } from "vue";
import Toast from "vue-toastification";
import { createInertiaApp } from "@inertiajs/vue3";
import mitt from "mitt";
import Layout from "./Components/Layout.vue";
import VitrineLayout from "./Components/Vitrine/Layout.vue";
import "vue-toastification/dist/index.css";
import OpenLayersMap from "vue3-openlayers";
import "vue3-openlayers/styles.css";
import DatePickerClient from "./Plugins/DatePicker.client";
import route from "ziggy";
import { ZiggyVue } from "./ziggy";
createInertiaApp({
resolve: (name) => {
const pages = import.meta.glob("./Pages/**/*.vue", { eager: true });
let page = pages[`./Pages/${name}.vue`];
page.default.layout = name.startsWith("Panel/") ? Layout : VitrineLayout;
return page;
},
setup({ el, App, props, plugin }) {
const emitter = mitt();
const VueApp = createApp({ render: () => h(App, props) });
VueApp.use(Toast, {});
VueApp.use(OpenLayersMap);
VueApp.use(DatePickerClient);
// VueApp.config.globalProperties.$route = route;
VueApp.provide("emitter", emitter);
VueApp.use(plugin);
VueApp.mixin({ methods: { route } });
VueApp.mount(el);
},
});
hellow. when i run
php artisan inertia:start-ssr
command in my terminal the ssr server work fine but when i reload browser page this error was showed:TypeError: _ctx.$route is not a function at file:///I:/Work/Code/Web/Khyaboon/bootstrap/ssr/ssr.js:47628:20 at renderComponentSubTree (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:683:9) at renderComponentVNode (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:631:12) at ssrRenderComponent (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:86:10) at file:///I:/Work/Code/Web/Khyaboon/bootstrap/ssr/ssr.js:48349:13 at renderComponentSubTree (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:683:9) at renderComponentVNode (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:631:12) at renderVNode (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:743:14) at renderComponentSubTree (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:698:7) at renderComponentVNode (I:\Work\Code\Web\Khyaboon\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:631:12)
and here is my app.js
and my ssr.js
and my vite.config.js
The text was updated successfully, but these errors were encountered: