报错 方法一、更换版本 npm i vue-router@3.0 -S 方法二 修改入口文件 //main.js import Router from 'vue-router' const originalPush = Router.prototype.push Router.prototype.push = function push(location) { return originalPush.call(this, location).catch(err => err) }