Reputation: 10882
I just read the answers to this question and wasn't able to get a good response.
Laravel Example.vue not updating
I also posted this question trying to figure it out on my own but to no avail.
how do I load a Vue component in Laravel 5.4?
As another attempt, I just did a new reinstall of Laravel, and while I am able to get the default Example.vue component to load multiple times in a single view, I am still unable to change the contents of the component. Funnier thing is that when I run npm install and then npm run dev, the component ceases to even show up anymore.
This is really frustrating because Laravel ships with Vue.js yet I am unable to utilize it. Any help would be much appreciated! :)
Upvotes: 1
Views: 4170
Reputation: 1
Double check and make sure you're in the resources directory and not public. If you're in the correct directory try npm install
then npm run watch
Upvotes: 0
Reputation: 4285
You need to install the node dependencies and then compile them.
npm install
npm run dev
Your browser may also be showing the cached version. Chrome has a setting that you can have the cache disabled while the inspector is open.
You can also check it by opening your project in other browsers.
If when running npm run dev
dies without any message of any kind you can delete your node_modules folder then run npm install
and then compile your assets again.
You may also need to clear and rebuild a few other caches with commands:
composer dump-autoload
php artisan clear-compiled
php artisan cache:clear
Upvotes: 4