In app.js, try changing the id value from 'my-app' to 'app'.
Vite + Inertia.js - caught (in promise) TypeError: Cannot read properties of undefined (reading 'default')
I'm running into an issue with production builds where no pages load with the error: caught (in promise) TypeError: Cannot read properties of undefined (reading 'default')
I've read a few threads that seem related: Laracasts Forum: Inertia.js + Vue 3 + TS = "Cannot read properties of null (reading 'dataset')" StackOverflow: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'default')
However, none of the solutions seem to resolve the issue. It seems specific to the way CreateInertiaApp in app.js is handling things, and I'm a bit confused because the laravel-vite documentation seems to conflict a bit with inertia documentation. In fact, if I don't use laravel-vite's resolvePageComponent function, it fails to find the vue components and throws an error: Unable to locate file in Vite manifest: resources/js/Pages/___.vue
Everything works fine in development, only failing in production (or testing with npm run build and serving from the public directory)
Laravel 10.13.1
inertiajs/inertia-laravel 0.6.9
@inertiajs/[email protected]
[email protected]
[email protected]
[email protected]
Please or to participate in this conversation.