-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Bug]: Inertia view not found #109
Comments
you need manual publish |
Yeah, i find out in the #20 and write about the solution in the issue. But I think we could have another way without depending of the testing config or at least having instructions in the docs/readme for now. |
You can set the config directly in the <?php
class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
Vite::prefetch(concurrency: 3);
// Override Inertia's default page paths so Laravel VS Code extension can find them
config(['inertia.testing.page_paths' => [resource_path('js/pages')]]);
}
} So no need to publish a config you don't need in your project now, but yeah, the current solution looks like a work around and not an actual solution. |
On a Mac, the "Inertia view is not found" message returns after the file has been changed from uppercase to lowercase. For example, having this: return Inertia::render('Welcome', [...]) with a and then changing the file in the filesystem to return Inertia::render('welcome', [...]) it will show the "Inertia view is not found" message again and 'welcome' will be underlined. It will work after restarting VSCode, though. |
@frankmichel maybe i'm wrong but i think this is related to a very old issue in vscode microsoft/vscode#94307 (theres other issues in the repo too related to case sensitivity systems/volumes not only on macos). Like, every time I rename a file using vscode file tree or in finder it don't show the new file and sometime show the original as deleted and only work after restarting vscode). |
This should be resolved as of v0.1.17 as long as |
@joetannenbaum Quick question - where do I configure inertia.testing.page.paths in v1.0.0? Do I still need to manually add it to AppServiceProvider as @lcdss suggested? I'm getting warnings in my Laravel 12 app, even though the file exists in the default installation. Would appreciate your guidance! |
I am also having the same issue with Laravel 12 |
Extension Version
0.1.14
PHP Binary
Herd
Operating System
macOS
What happened?
I'm using the version 0.1.14 from this extension and still not finding my inertia views.
I'm using vite with react.js and typescript in a "custom" directory, so my views is in this path:
On controllers and routes using inertia helper:
shows
My views lives in
resources/js/pages
.My
createInertiaApp
inresources/js/app.tsx
:.
.
.
Current solution
Based on the PR #20 the solution on 0.1.13 was getting the path from the inertia config file but I don't have one in my project and never had the need to publish it. I think Inertia don't publish it on install too?
It works after publish the inertia config file through
php artisan vendor:publish
and selectInertia\ServiceProvider
..
.
.
Custom inertia
resolve
method issueMaybe having a option in the extension for inertia view path is not a bad thing because it's easier to discover that than to discover you need to publish the inertia config for the extension work and it's a good thing too to custom
resolve
implementations.Like this one I have in one project to auto-discover
{page}/index.tsx
files. Instead of typeinertia('payment/index)
I only typeinertia('payment')
(Both works btw). My inertiaresolve
method:Mimimal Code Sample
No response
The text was updated successfully, but these errors were encountered: