Module not found: Error: Can't resolve '../views/Home.vue' in 'E:\idea-workspace\day83_phone-store_vantui+vue\phone_store\src\router'
时间: 2023-11-23 16:06:58 浏览: 188
引用\[1\]:Module not found: Error: Can't resolve '../views/AboutView.vue' in 'C:\Users\24210\Desktop\houtai\src\router'。引用\[2\]:ERROR in ./src/router/index.js 35:11-37:29 Module not found: Error: Can't resolve '../views/AboutView.vue' in 'C:\Users\24210\Desktop\houtai\src\router' @ ./src/main.js 37:0-30 52:10-16。引用\[3\]: 解决方法很简单 把 ./ 改成 …/ import Vue from 'vue' import Router from 'vue-router' import Login from '../components/Login.vue' Vue.use(Router) export default new Router({ routes: \[ { path: '/login', component: Login } \] })。
问题:Module not found: Error: Can't resolve '../views/Home.vue' in 'E:\idea-workspace\day83_phone-store_vantui+vue\phone_store\src\router'
回答: 根据提供的引用内容,出现了一个模块找不到的错误,具体是在路径'E:\idea-workspace\day83_phone-store_vantui+vue\phone_store\src\router'中找不到'../views/Home.vue'模块。这个错误可能是由于路径配置不正确或者文件确实不存在导致的。为了解决这个问题,你可以尝试修改路径配置,将'./'改为'../',或者确保'../views/Home.vue'文件存在于指定路径中。如果你使用的是Vue框架,你还可以检查路由配置文件中是否正确引入了'../views/Home.vue'组件。希望这些解决方法能帮到你。
#### 引用[.reference_title]
- *1* *2* [Module not found: Error: Can‘t resolve ‘../views/AboutView.vue‘ in ‘C:\Users\24210\Desktop\hout](https://blog.csdn.net/shsh546/article/details/125003193)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Vue初学碰到Module not found: Error: Can‘t resolve ‘./components/Login.vue‘ in](https://blog.csdn.net/qq_41309350/article/details/123028024)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文