码迷,mamicode.com
首页 > Web开发 > 详细

vue 引入库css时,报There are multiple modules with names that only differ in casing.警告

时间:2019-10-12 18:43:02      阅读:340      评论:0      收藏:0      [点我收藏+]

标签:node   equal   san   case   eve   other   new   HERE   name   

vue项目,在引入element-ui样式时(在react angular项目中也出现此告警)

import ‘element-ui/lib/theme-chalk/index.css‘

报警告:

 warning  in D:/vuePro/cloud-monitor-vue/node_modules/_css-loader@3.2.0@css-loader/dist/runtime/api.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:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\runtime\api.js
    Used by 1 module(s), i. e.
    D:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\cjs.js??ref--6-oneOf-3-1!D:\vuePro\cloud-monitor-vue\node_modules\_postcss-loader@3.0.0@postcss-loader\src\index.js??ref--6-oneOf-3-2!D:\vuePro\cloud-monitor-vue\node_modules\_element-ui@2.12.0@element-ui\lib\theme-chalk\index.css
* d:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\runtime\api.js
    Used by 4 module(s), i. e.
    d:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\cjs.js??ref--6-oneOf-3-1!d:\vuePro\cloud-monitor-vue\node_modules\_postcss-loader@3.0.0@postcss-loader\src\index.js??ref--6-oneOf-3-2!d:\vuePro\cloud-monitor-vue\src\assets\styles\reset.css

 warning  in D:/vuePro/cloud-monitor-vue/node_modules/_css-loader@3.2.0@css-loader/dist/runtime/getUrl.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:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\runtime\getUrl.js
    Used by 1 module(s), i. e.
    D:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\cjs.js??ref--6-oneOf-3-1!D:\vuePro\cloud-monitor-vue\node_modules\_postcss-loader@3.0.0@postcss-loader\src\index.js??ref--6-oneOf-3-2!D:\vuePro\cloud-monitor-vue\node_modules\_element-ui@2.12.0@element-ui\lib\theme-chalk\index.css
* d:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\runtime\getUrl.js
    Used by 1 module(s), i. e.
    d:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\cjs.js??ref--6-oneOf-3-1!d:\vuePro\cloud-monitor-vue\node_modules\_postcss-loader@3.0.0@postcss-loader\src\index.js??ref--6-oneOf-3-2!d:\vuePro\cloud-monitor-vue\src\assets\styles\iconfont.css

 warning  in D:/vuePro/cloud-monitor-vue/node_modules/_vue-style-loader@4.1.2@vue-style-loader/lib/addStylesClient.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:\vuePro\cloud-monitor-vue\node_modules\_vue-style-loader@4.1.2@vue-style-loader\lib\addStylesClient.js
    Used by 1 module(s), i. e.
    D:\vuePro\cloud-monitor-vue\node_modules\_vue-style-loader@4.1.2@vue-style-loader\index.js??ref--6-oneOf-3-0!D:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\cjs.js??ref--6-oneOf-3-1!D:\vuePro\cloud-monitor-vue\node_modules\_postcss-loader@3.0.0@postcss-loader\src\index.js??ref--6-oneOf-3-2!D:\vuePro\cloud-monitor-vue\node_modules\_element-ui@2.12.0@element-ui\lib\theme-chalk\index.css
* d:\vuePro\cloud-monitor-vue\node_modules\_vue-style-loader@4.1.2@vue-style-loader\lib\addStylesClient.js
    Used by 4 module(s), i. e.
    D:\vuePro\cloud-monitor-vue\node_modules\_vue-style-loader@4.1.2@vue-style-loader\index.js??ref--6-oneOf-3-0!D:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\cjs.js??ref--6-oneOf-3-1!D:\vuePro\cloud-monitor-vue\node_modules\_postcss-loader@3.0.0@postcss-loader\src\index.js??ref--6-oneOf-3-2!d:\vuePro\cloud-monitor-vue\src\assets\styles\reset.css

 warning  in D:/vuePro/cloud-monitor-vue/node_modules/_vue-style-loader@4.1.2@vue-style-loader/lib/listToStyles.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:\vuePro\cloud-monitor-vue\node_modules\_vue-style-loader@4.1.2@vue-style-loader\lib\listToStyles.js
    Used by 3 module(s), i. e.
    D:\vuePro\cloud-monitor-vue\node_modules\_vue-style-loader@4.1.2@vue-style-loader\lib\addStylesClient.js
* d:\vuePro\cloud-monitor-vue\node_modules\_vue-style-loader@4.1.2@vue-style-loader\lib\listToStyles.js
    Used by 3 module(s), i. e.
    d:\vuePro\cloud-monitor-vue\node_modules\_vue-style-loader@4.1.2@vue-style-loader\lib\addStylesClient.js


  App running at:
  - Local:   http://localhost:8080/
  - Network: http://192.168.43.65:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

 

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

提示你引用模块的时候,有模块名字一样,除了第一个字母有大小写区别外。

问题原因:

* D:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\runtime\getUrl.js
    Used by 1 module(s), i. e.
    D:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\cjs.js??ref--6-oneOf-3-1!D:\vuePro\cloud-monitor-vue\node_modules\_postcss-loader@3.0.0@postcss-loader\src\index.js??ref--6-oneOf-3-2!D:\vuePro\cloud-monitor-vue\node_modules\_element-ui@2.12.0@element-ui\lib\theme-chalk\index.css
* d:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\runtime\getUrl.js
    Used by 1 module(s), i. e.
    d:\vuePro\cloud-monitor-vue\node_modules\_css-loader@3.2.0@css-loader\dist\cjs.js??ref--6-oneOf-3-1!d:\vuePro\cloud-monitor-vue\node_modules\_postcss-loader@3.0.0@postcss-loader\src\index.js??ref--6-oneOf-3-2!d:\vuePro\cloud-monitor-vue\src\assets\styles\iconfont.css

 warning  in D:/vuePro/cloud-monitor-vue/node_modules/_vue-style-loader@4.1.2@vue-style-loader/lib/addStylesClient.js

windows下盘符的大小写导致的。D盘和d盘。

我在运行时,用的是vsCode的脚本启动,系统未区分D盘和d盘,导致此告警。

技术图片

 

 解决方法:

在终端输入命令启动,改成大写的D盘符就没问题了。

  D:\vuePro\cloud-monitor-vue>npm run serve 

 

参考:

https://my.oschina.net/u/2262481/blog/1859366

https://www.cnblogs.com/heguo/p/6573863.html

 

vue 引入库css时,报There are multiple modules with names that only differ in casing.警告

标签:node   equal   san   case   eve   other   new   HERE   name   

原文地址:https://www.cnblogs.com/dapengFly/p/11663148.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!