-
Notifications
You must be signed in to change notification settings - Fork 845
Uncaught ReferenceError: route is not defined #482
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
Comments
What version of laravel-jetstream in your package.json are you using? |
I'm using laravel-jetstream version 0.0.3 |
Having same issue as well, same versions. |
But I don't have the issue on another app with a older version
|
I had this issue myself when installing Jetstream with Inertia for the first time where there were a few hiccups along the way i.e. the installer didn't work as expected because of my local environment so I had to install a few dependencies manually. For me once I'd created an account and was taken to /dashboard the issue was clearer since I could only see @routes output in the browser. This is because the @routes blade directive wasn't available from the jetstream/src/Console/InstallCommand.php Line 249 in daba984
If that's the same for you just do |
And the calls to |
The Laravel Jetstream login, two-factor login, registration, password reset, and email verification views have guest.blade.php as the base layout while everything else uses app.blade.php. In the guest.blade.php the @routes directive is missing but the mix('js/app.js') depends on it. I tried adding it to the guest.blade.php template but now i get a |
I'm getting the route is not defined on a fresh install of Laravel/Jetstream/Inertia/Vue stack when I go to /login |
On a fresh install of Laravel/Jetstream/Inertia I removed the following from
If I understand correctly, because all the Jetstream auth scaffolding is in blade (with livewire I think?), the application scripts are not necessary for guest views. This resolved the error but I'm eager to learn about any other solution someone may have, I'm not sure if the application scripts should be included in guest views or not. |
I had all the same problems described above on a fresh installation. I was able to fix it by changing the branch to "master" in composer.json. "laravel/jetstream": "master", And repeating the installation steps. The 1.6 release seems broken. |
Managed to reproduce this. Investigating. |
This should fix it: #485 |
Thank you! |
I meet the same issue, wonder how fix? |
@phoenixg Try running npm run production |
Description: Login page displays error on the web console. This message disappears once a user is logged in.
Uncaught ReferenceError: route is not defined at Module../resources/js/app.js
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: