Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Bastet's avatar

app.js not updating when using vue

I'm using vue for my site and when I save the vue file, my terminal says that everything is fine and doesn't come back with any errors when I run npm run watch, but nothing has changed. For example it's saying

[Vue warn]: Unknown custom element: <product-sorting> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

I know longer have <product-sorting>

I've tried running npm install but that didn't work

0 likes
4 replies
JohnBraun's avatar

Did you register your component in resources/js/app.js?

Vue.component('product-sorting', require('./components/ProductSorting.vue').default);

And did you recompile your assets with Laravel mix (webpack)?

Bastet's avatar

yep. So after I did my changes I typed in npm run watch

MartinFolkerts's avatar

Did the new app.js compile without errors? And did you bust your browser cache?

Bastet's avatar

No errors showed up and I did clear my cache

Please or to participate in this conversation.