Reputation: 303
My app just displays the html code in the browser. It worked fine. I was actually working on an update when I noticed the view didn't seem to refresh, so I cleared cookies in my browser. That didn't work so I ran php artisan view:clear. It was still not working, so I just wanted to reset and clear all cache and ran php artisan optimize:clear. After attempting to reset and cache everything the view been messed up and all I see is the html in the browser. I have tried what I feel like is every artisan command, php artisan config:clear php artisan config:clear and cache, php artisan view:clear and cache php artisan route:clear and cache, php package:discover, livewire:discover, composer dump-autoload, - delete all in bootstrap cache, sudo rm -rf vendor/ , sudo rm composer.lock composer install, npm install, npm run dev, reinstall everything. I even just decided to clone a whole new project from the repo. Composer install, npm install, npm run dev and still the save exact issue. Help is appreciated. The routes still seem to work on the navbar, it is just the views. Thanks!
UPDATE: Another developer cloned the project on their computer and it works fine. Still can't get it to work on mine.
Upvotes: 0
Views: 5544
Reputation: 1
Check this: enter link description here
I was also having this problem, and realized that the config for manifest_path was pointing to the wrong directory. As you can see, /tmp/storage/bootstrap/cache doesn't exist for a fresh Laravel install on a local machine so it can't ever find it.
The solution is to publish the config with php artisan vendor:publish --tag=livewire:config and then change manifest_path to the appropriate path, mine being \bootstrap\cache\livewire-components.php.
Hope this helps!
Upvotes: -1
Reputation: 741
Enclose all your livewire components blade code inside a parent div tag. I think it will solbe your issue.
Upvotes: 0
Reputation: 1030
I have also encountered the same issue. It happens because of having an HTML comment at the beginning of the livewire blade component. For example,
<!-- <div> -->
Remove the HTML comment and it will resolve the issue.
Upvotes: 1