关于vue中报错There are multiple modules with names that only differ in casing.
之前在开发时遇到这个报错。emm。直译一下就是说有很多模块命名仅有大小写的区别。这错误提示。怎么看都是暗示我们有几个文件或者模块的name起的一样了。
然鹅。实际上导致这个问题的原因是引用模块的时候模块名称写的不正确导致的。比如我的:
其实是由于这里的import Vue from == “vue”== 写成了import Vue from “Vue” 导致出现了如下的错误提示
There are multiple modules with names that only differ in casing. friendly-errors 15:23:15
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
我简单测试了一下 。貌似只有vue这个模块的大小写不正确才会导致这个问题。所以排查起来还是很容易的。