Vue报错:This dependency was not found: vuex in ./node_modules/babel-loader/lib

简介: Vue报错:This dependency was not found: vuex in ./node_modules/babel-loader/lib

报错


This dependency was not found:
* /components/Lianxi.vue in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
To install it, you can run: npm install --save /components/Lianxi.vue



原因&解决


1. 可能存在问题是 安装的vuex出现问题


解决方法:


根据提示再次安装 vuex,执行


npm install --save vuex


再不行那就是vuex的版本问题,vuex4不匹配vue2


详细查看下面博文:


https://blog.csdn.net/weixin_45525272/article/details/124961685


2. 文件路径引入出现错误:


检查提示的路径,看看路径是否有问题



3. 代码写错了,例如:引入时候vuex后多打了一个空格



删除后就可以正确运行

相关文章
|
11天前
|
网络安全 计算机视觉
【node】 npm install 报错:code 128
【node】 npm install 报错:code 128
32 1
|
16天前
|
JavaScript 应用服务中间件 nginx
vue项目中页面遇到404报错
vue项目中页面遇到404报错
|
1月前
vue3配置路由报错Catch all routes (“*“) must now be defined using a param with a custom regexp.
vue3配置路由报错Catch all routes (“*“) must now be defined using a param with a custom regexp.
43 0
|
12天前
|
JavaScript 算法 Linux
【vue报错】error:0308010C:digital envelope routines::unsupported
【vue报错】error:0308010C:digital envelope routines::unsupported
37 3
|
2月前
|
SQL 消息中间件 存储
Flink报错问题之Flink报错:Table sink 'a' doesn't support consuming update and delete changes which is produced by node如何解决
Flink报错通常是指在使用Apache Flink进行实时数据处理时遇到的错误和异常情况;本合集致力于收集Flink运行中的报错信息和解决策略,以便开发者及时排查和修复问题,优化Flink作业的稳定性。
|
15天前
报错/ ./node_modules/axios/lib/platform/index.js Module parse failed: Unexpected token (5:2)怎么解决?
报错/ ./node_modules/axios/lib/platform/index.js Module parse failed: Unexpected token (5:2)怎么解决?
|
7天前
|
JavaScript
vue项目使用可选链操作符编译报错问题
vue项目使用可选链操作符编译报错问题
13 0
|
7天前
|
JavaScript
Vue项目启动报错处理
Vue项目启动报错处理
8 1
|
14天前
|
消息中间件 Linux
mq报错abbit@syld36: * connected to epmd (port 4369) on syld36 * epmd reports node ‘rabbit‘ uses po
mq报错abbit@syld36: * connected to epmd (port 4369) on syld36 * epmd reports node ‘rabbit‘ uses po
12 0
|
2月前
|
JavaScript 开发者
Vue的报错机制
Vue的报错机制
14 0