Unhandled Promise Rejection: ReferenceError: Can't find variable: Ziggy
Unhandled Promise Rejection: ReferenceError: Can't find variable: Ziggy on ios device. laravel and inertia app on live server
@JeffreyWay
It will be difficult to help you if you don't show any part of your code.
For example have you correctly declared Ziggy in the app.js file ?
@vincent15000 this is my app.js
import './bootstrap';
import '../css/app.css';
import { createApp, h } from 'vue';
import { createInertiaApp } from '@inertiajs/inertia-vue3';
import { InertiaProgress } from '@inertiajs/progress';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
import { createPinia } from 'pinia';
// import CKEditor from '@ckeditor/ckeditor5-vue';
const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel';
const pinia = createPinia()
createInertiaApp({
title: (title) => `${title} - ${appName}`,
resolve: (name) => resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob('./Pages/**/*.vue')),
setup({ el, app, props, plugin }) {
return createApp({ render: () => h(app, props) })
.use(plugin)
.use(pinia)
.use(ZiggyVue, Ziggy)
.mount(el);
},
});
InertiaProgress.init({ color: '#4B5563' });
@Talcas Please write your code between backticks.
```
your code here
```
Please or to participate in this conversation.