'Heroku: Livewire is not defined
I I'm trying to deploy a web app written in Laravel - Livewire to Heroku, the app has launched on Heroku, but when I open the console, I get an error "Livewire is not defined". I tried the command: heroku run php artisan livewire:publish --assets or even changing app_url, asset_url in config/livewire.php but neither of them can handle this error. App runs normally on localhost. Has anyone had this problem or know how to fix it?
Here is the error code on console: GET http://nvt-base-api.herokuapp.com/vendor/livewire/livewire.js?id=940557fc56b15ccb9a2d net::ERR_ABORTED 403 (Forbidden) login:81 Uncaught ReferenceError: Livewire is not defined at login:81:27 (anonymous) @ login:81
Solution 1:[1]
I tried this and it worked for me. Fix " 'asset_url' => null, " in config/livewire.php to " 'asset_url' => 'public', ". App will run normally on heroku but will give error "Livewire is not defined" on localhost.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | V?n Tr??ng Nguy?n |
