zoukankan      html  css  js  c++  java
  • There are multiple modules with names that only differ in casing. 问题的一种解决方法

    ------------恢复内容开始------------

     WARNING  Compiled with 2 warnings
    
     warning  in ./node_modules/node-libs-browser/mock/process.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:
    * C:UserscoderSourceReposproject_nameviews
    ode_modules
    ode-libs-browsermockprocess.js
        Used by 1 module(s), i. e.
        C:UserscoderSourceReposproject_nameviews
    ode_modulesaxioslibdefaults.js
    * C:Userscodersource
    eposproject_nameviews
    ode_modules
    ode-libs-browsermockprocess.js
        Used by 1 module(s), i. e.
        C:Userscodersource
    eposproject_nameviews
    ode_modulespath-browserifyindex.js
    
     warning  in ./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:
    * C:UserscoderSourceReposproject_nameviews
    ode_moduleswebpackuildinglobal.js
        Used by 3 module(s), i. e.
        C:UserscoderSourceReposproject_nameviews
    ode_modulesvuedistvue.runtime.esm.js
    * C:Userscodersource
    eposproject_nameviews
    ode_moduleswebpackuildinglobal.js
        Used by 2 module(s), i. e.
        C:Userscodersource
    eposproject_nameviews
    ode_modulessockjs-clientdistsockjs.js
    

      

    网上可以查到好多帖子,有说把 import 的 @ 和 ‘../../xxx’ 这两种路径描述方式统一的,还有说查找一下文件名大小写的。

    不过这个问题应该都是在windows系统下做开发会出现,主要是路径的大小写问题,有的人帖子写的是自定义组件文件名的问题(不过这种情况下,大小写对不上应该会直接在控制台报错的),象我这样属于npm里的三方组件库。

    后来我想了一下,我的代码换过一次位置,换到了 C:UserscoderSourceRepos  这个存在大写字母的路径下,于是我就想是否可能原因在这里。

    所以我就在 C:codeproject_name 这个目录(除盘符全小写)下重新从git拖了一个项目过来,再运行,真就不报warning了。。。

    大家全在小写路径下存代码应该就可以了,另外组件和文件名也建议全小写,省去各种因字母大小写产生的困扰,驼峰不了就用减号或下划线分隔。

    ------------恢复内容结束------------

    快写完还没发的时候电脑死机了。。博客园的这个即时保存和恢复功能真是太香了!!

  • 相关阅读:
    虚拟机的三种联网模式(桥接模式、NAT 模式、仅主机模式)
    Vue 分页器 Pagination 实现点击分页器,平滑到对应的dom组件,而不是直接切换对应的组件
    img图片的处理技巧
    Vue中在DOM组件上动态绑定数据
    vue3.0中使用postcss-pxtorem
    vue中实现点击div有样式去除样式 无样式添加样式
    网易云音乐API,的调用方法 ,vue项目中(在本地使用)
    我的mixin.scss文件
    kendo-ui 几个有用的数据操作
    开发中常见的common.js--1
  • 原文地址:https://www.cnblogs.com/laozuan/p/13033920.html
Copyright © 2011-2022 走看看