首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >./node_modules/Vuex/dist/vuex.esm.js中的警告

./node_modules/Vuex/dist/vuex.esm.js中的警告
EN

Stack Overflow用户
提问于 2018-02-16 16:20:04
回答 2查看 2.9K关注 0票数 0

我正在测试的项目工作正常,但在我的项目上运行npm run dev后,我收到以下警告消息:

代码语言:javascript
复制
 WARNING  Compiled with 1 warnings                                                                                                                                           17:06:47

 warning  in ./node_modules/Vuex/dist/vuex.esm.js

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:
* /Users/me/code/vue/vuex-test/node_modules/Vuex/dist/vuex.esm.js
    Used by 1 module(s), i. e.
    /Users/me/code/vue/vuex-test/node_modules/babel-loader/lib/index.js!/Users/me/code/vue/vuex-test/node_modules/vue-loader/lib/selector.js?type=script&index=0!/Users/me/code/vue/vuex-test/src/components/Test.vue
* /Users/me/code/vue/vuex-test/node_modules/vuex/dist/vuex.esm.js
    Used by 1 module(s), i. e.
    /Users/me/code/vue/vuex-test/node_modules/babel-loader/lib/index.js!/Users/me/code/vue/vuex-test/src/store/store.js

这是由我的./store/store.js文件中的行import Vuex from 'vuex'引起的,该文件由我的main.js中的import store from './store/store'调用。

是Vuex模块中的bug,还是有办法在我的代码中修复它?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-02-16 17:20:08

这行代码:

代码语言:javascript
复制
import Vuex from 'vuex'

应该写成:

代码语言:javascript
复制
import Vuex from 'Vuex'
票数 1
EN

Stack Overflow用户

发布于 2019-12-04 21:38:40

我也遇到过类似的问题。我已经停止了应用程序,并使用npm run dev重新启动了它,错误消失了。我用的是

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

本身,但似乎这不是问题

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48822662

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档