分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 代码编程

Vue.js搭建路由报错 router.map is not a function,Cannot read property ‘component’ of undefined

发布时间:2023-09-06 01:33责任编辑:郭大石关键词:js

错误:

解决办法:

2.0已经没有map了,使用npm install vue-router@0.7.13 命令兼容1.0版本vue

但是安装完之后会出现一个错误: Cannot read property ‘component’ of undefined

看到了一个解决办法:npm install vue-router@next; 就能解决问题。

但是我做了;还是 Cannot read property ‘component’ of undefined;我的理解是vue已经到2了;不能用1的vue-router了。

等我将router改为2的时候,再写篇解决办法。。。

Vue.js搭建路由报错 router.map is not a function,Cannot read property ‘component’ of undefined

原文地址:https://www.cnblogs.com/zr123/p/8142981.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved