前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >vue使用vuex后报警:There are multiple modules with names that only differ in casing.

vue使用vuex后报警:There are multiple modules with names that only differ in casing.

作者头像
寻找石头鱼
发布2020-03-27 10:02:04
1.2K0
发布2020-03-27 10:02:04
举报
文章被收录于专栏:寻找石头鱼寻找石头鱼

在vue项目中使用了vuex,但是项目跑起来之后控制台告警:

There are multiple modules with names that only differ in casing.

This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Use equal casing. Compare these module identifiers:

  • F:\dch\workspace\PMS\node_modules\Vuex\dist\vuex.esm.js Used by 1 module(s), i. e. F:\dch\workspace\PMS\node_modules\babel-loader\lib\index.js!F:\dch\workspace\PMS\node_modules\eslint-loader\index.js??ref--0!F:\dch\workspace\PMS\src\store\index.js
  • F:\dch\workspace\PMS\node_modules\vuex\dist\vuex.esm.js Used by 9 module(s), i. e. F:\dch\workspace\PMS\node_modules\babel-loader\lib\index.js!F:\dch\workspace\PMS\node_modules\vue-loader\lib\selector.js?type=script&index=0!F:\dch\workspace\PMS\src\views\server.vue

这是因为在引入vuex的时候有的地方首字母大写有的地方首字母小写引起的。具体代码如下: store/index.js引入代码如下:

代码语言:javascript
复制
import Vuex from "Vuex";

在vue文件引入vuex的代码如下:

代码语言:javascript
复制
import { mapMutations } from "vuex";

将index.js引入的vuex首字母改成小写就解除了这个告警信息

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-03-25 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • There are multiple modules with names that only differ in casing.
  • 将index.js引入的vuex首字母改成小写就解除了这个告警信息
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档