Closed francoism90 closed 3 weeks ago
It turns out this is related to something I did in ViewServiceProvider:
Vite::useWaterfallPrefetching(concurrency: 10);
Is this expected?
@francoism90, you should only use the @vite
directive once in your views.
<!doctype html>
<html
class="scroll-smooth"
lang="{{ str_replace('_', '-', app()->getLocale()) }}"
>
<head>
<!-- ... -->
@vite(['resources/js/app.js', 'resources/css/app.css'])
</head>
<!-- ... -->
</html>
I'd also recommend using the documented approach for setting prefetching.
Vite::prefetch(concurrency: 10);
Let me know if you are still having issues after that.
Vite Plugin Version
1.0.5
Laravel Version
11.28.1
Node Version
20.15.1
NPM Version
10.8.0
Operating System
Linux
OS Version
41
Web browser and version
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Running in Sail?
No
Description
I'm keep getting the following console error after upgrading to the latest Laravel version:
Uncaught TypeError: Cannot read properties of null (reading 'length')
This seems to be the full dump:
What's even weirder, is that it's included twice (
<head>
+<body>
).Steps To Reproduce
This is my
app.blade.php
:This is with latest Livewire as well.