npm run dev 启动项目后报三个警告
WARNING Compiled with 3 warnings 10:42:29
warning in ../vuecliTest/node_modules/webpack/buildin/global.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:
* D:\Vue\VueCli\vuecliTest\node_modules\webpack\buildin\global.js
Used by 2 module(s), i. e.
D:\Vue\VueCli\vuecliTest\node_modules\node-libs-browser\node_modules\punycode\punycode.js
* D:\Vue\VueCli\vueclitest\node_modules\webpack\buildin\global.js
Used by 1 module(s), i. e.
D:\Vue\VueCli\vueclitest\node_modules\vue\dist\vue.esm.js
warning in ../vuecliTest/node_modules/webpack/hot/emitter.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:
* D:\Vue\VueCli\vuecliTest\node_modules\webpack\hot\emitter.js
Used by 1 module(s), i. e.
D:\Vue\VueCli\vuecliTest\node_modules\webpack-dev-server\client\index.js?http://localhost:8080
* D:\Vue\VueCli\vueclitest\node_modules\webpack\hot\emitter.js
Used by 1 module(s), i. e.
D:\Vue\VueCli\vueclitest\node_modules\webpack\hot\dev-server.js
warning in ../vuecliTest/node_modules/webpack/hot/log.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:
* D:\Vue\VueCli\vuecliTest\node_modules\webpack\hot\log.js
Used by 1 module(s), i. e.
D:\Vue\VueCli\vuecliTest\node_modules\webpack\hot nonrecursive /^\.\/log$/
* D:\Vue\VueCli\vueclitest\node_modules\webpack\hot\log.js
Used by 2 module(s), i. e.
D:\Vue\VueCli\vueclitest\node_modules\webpack\hot\dev-server.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.
使用唯一的写法
猜测是因为你的文件名和引用不一致,举个例,文件名是App.js,但是你引用的时候是写的app.js
2017年07月03日回答9 评论赞赏编辑
devlee
1k 声望
字面意思明白,但还是不知道应该怎样处理。所提及的地方都第三方组件,是npm安装的。
— jangel · 2017年07月03日
回复 jangel:
试一下,将项目放到一个路径没有大写字母的文件夹下
— devlee · 2017年07月03日
回复 jangel:
盘符要大写
— devlee · 2017年07月03日
谢谢啦,把目录放到一个全小写字母下,真的没警告了,项目的目录不能有大写吗?
— jangel · 2017年07月03日
2
回复 jangel:
文件夹,文件名最好都是小写,可以加符号“-”来分词,不要有空格
— devlee · 2017年07月03日
我今天也碰到这个问题了,折腾了好几个小时,话说这个问题更深层次的原因是什么?
— 东尼大兔 · 2017年10月19日
回复 东尼大兔:
首先这个只是warning,不同的系统比如windows和linux对于文件路径或者文件名是否区分大小写是不一样的,windows不区分,而linux区分,所以会导致可能发生的模块冲突问题
— devlee · 2017年10月19日
回复 devlee:
谢谢!
— 东尼大兔 · 2017年10月19日
0
谢大神。。弄了半天就是因为文件夹路径有大写字母
————————————————
版权声明:本文为优快云博主「柱子柱子柱子钰」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。