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

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

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

报警告:

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

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

时间: 2024-10-08 09:06:06

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

vue报错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 mod

今天在开发一个新项目时,当安装完依赖包启动项目后报了一个这个错 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 谷歌翻译一下: 有

VUE.JS 使用axios数据请求时数据绑定时 报错 TypeError: Cannot set property 'xxxx' of undefined 的解决办法

正常情况下在data里面都有做了定义 在函数里面进行赋值 这时候你运行时会发现,数据可以请求到,但是会报错 TypeError: Cannot set property 'listgroup' of undefined 主要原因是: 在 then的内部不能使用Vue的实例化的this, 因为在内部 this 没有被绑定.可以看下 Stackoverflow 的解释: 解决办法: 1.用ES6箭头函数,箭头方法可以和父方法共享变量 2.在请求axios外面定义一下 var that=this 问题

VUE - 使用axios数据请求时数据绑定时 报错 TypeError: Cannot set property 'xxxx' of undefined 的解决办法

created() { var that=this axios.get('http://jsonplaceholder.typicode.com/todos') .then(function (res) { // handle success // console.log(res); that.todos = res.data }) .catch(function (error) { // handle error console.log(error); }) .finally(function

在vue中使用css modules替代scroped

前面的话 css modules是一种流行的模块化和组合CSS的系统. vue-loader提供了与css modules的集成,作为scope CSS的替代方案.本文将详细介绍css modules 引入 最开始使用Vue的时候,提倡并大量使用的是scoped这种技术 <style scoped> @media (min-width: 250px) { .list-container:hover { background: orange; } } </style> 这个可选 sc

webpack构建Vue项目引入jQ时发生“&#39;$&#39; is defined but never used”的处理

今天公司需要新建个数据后台,就按照查到的方法构建了Vue框架的项目,引入jQ.bootstrap时,按照在线方法配置,发现 main.js 里的引用jQ一直显示红标,没多想,在按照网上配置完后,npm run dev运行,就抛出这么个错误,百思不得解 错误如下: '$' is defined but never used 1 http://eslint.org/docs/rules/space-before-function-paren 1 http://eslint.org/docs/rule

命令行连接mysql服务器时 报Can&#39;t connect to local MySQL server through socket &#39;xxx.sock&#39;错误

本来之前用的好好的mysql服务器,突然就报Can't connect to local MySQL server through socket 'xxx.sock'错误了 遇到该问题思路首先是:检查 my.cnf 中 socket 配置的路径及权限. 但是查看完 没发现路劲权限有问题,最后跑去另一台同时配置的服务器上看  发现/data/perconadata有一个/mnt/perconadata/mysql.sock的软连接 于是乎到问题机器上 cd /data/perconadata/ s

oc调用c++接口时 报错 Undefined symbols for architecture i386:

当在oc中调用c++中的方法时,发现说c++中的方法没定义或是找不到 Undefined symbols for architecture i386: "_desTYData", referenced from:-[TuYoo encryptParametersWithDict:] in libtuyoo.a(TuYoo.o)ld: symbol(s) not found fo 记得c++中的方法定义是要这样定义的 extern"C" { const char *d

github提交代码时,报permission denied publickey

在像github提交代码时,报permission denied publickey. 查找了一下,可能是因为github的key失效了. 按照以下步骤,重新生成key. ssh-keygen 一路默认下去. 会在home目录的.ssh文件夹下生成两个文件: id_rsa 和id_rsa.pub id_rsa是私钥,需要保存在本地的.id_rsa.pub是公钥,需要上传到github. 在github的右上角edit your profile 里找到ssh key,然后add ssh key,把

WPF加载Winform窗体时 报错:子控件不能为顶级窗体

一.wpf项目中引用WindowsFormsIntegration和System.Windows.Forms 二.Form1.Designer.cs 的 partial class Form1 设置为:public partial class Form1 三.代码如下: XXXX.Form1 Zhuwindow = new XXXX.Form1(); Zhuwindow.TopLevel = false; Zhuwindow.FormBorderStyle = System.Windows.Fo