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

Ngozistephen's avatar

VueRouter

i am new to vue.js and laravel i am getting this error message in Vue App. Please how do i solve this error

export 'default' (imported as 'VueRouter') was not found in 'vue-router'

this is my router.js

import Vue from 'vue'; import VueRouter from 'vue-router'; Vue.use(VueRouter);

import ListingPage from '@assets/components/ListingPage.vue';

export default new VueRouter({ mode: 'history', routes: [ // { path: '/',component: HomePage }, // doesn't exist yet! { path: '/listing/:listing',component: ListingPage } ] });

0 likes
3 replies
OussamaMater's avatar
Level 37

Have you installed all the dependencies?

npm install vue-router@next --save

And is that some kind of outdated tutorial you followed? because it's been a while I haven't seen the VueRouter, I believe its v3 or v2 and not the current v4?

Provide more details about the versions and how you setup your project so we can help you.

Note: please wrap the code between ``` ``` to format it and make it easier to read.

Please or to participate in this conversation.