Did you re-build after the update? npm run dev
Just curious because we get involved in something and forget to do a simple step.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I did a npm update and composer update today and now I get the error everywhere where I use vue : [Vue warn]: Failed to mount component: template or render function not defined, even though everything worked perfectly fine before.
This is my package.json:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.16.2",
"bootstrap": "^4.0.0-beta",
"cross-env": "^5.0.5",
"jquery": "^3.1.1",
"laravel-mix": "^1.4.4",
"lodash": "^4.17.4",
"popper.js": "^1.12.3",
"vue": "^2.4.4",
"vue-chartjs": "^2.8.7"
},
"dependencies": {
"chart.js": "^2.7.0",
"dropzone": "^5.1.1",
"font-awesome": "^4.7.0",
"marked": "^0.3.6",
"moment": "^2.18.1",
"purify-css": "^1.2.6",
"purifycss-webpack": "^0.7.0",
"tempusdominus-bootstrap-4": "^5.0.0-alpha9"
}
}
and my app.js
require('./bootstrap');
window.Vue = require('vue');
Vue.component('dashboard', require('./components/Dashboard.vue'));
Vue.component('roles', require('./components/Roles.vue'));
Vue.component('sites-edit', require('./components/SitesEdit.vue'));
const app = new Vue({
el: '#app',
});
I would really appreciate if anybody has an idea of what it could be.
Need to remove the require statement from global components in app.js for some reason. I did it like this:
import Flash from './components/Flash.vue';
Vue.component('flash', Flash);
and it works fine.
Please or to participate in this conversation.