zoukankan      html  css  js  c++  java
  • 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

    在写vue项目的时候

    当我使用 :

    import dataSource from '../overseaProduct/house/dataSource';

    引入dataSource文件的时候:控制台报如下警告:

    client?e46d:147 ./src/views/overseaProduct/house/dataSource.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:
    * F:jrtfWorkOA
    ode_moduleshappypackloader.js?id=happybabel!F:jrtfWorkOAsrcviewsoverseaProducthousedataSource.js
        Used by 1 module(s), i. e.
        F:jrtfWorkOA
    ode_modulesabel-loaderlibindex.js!F:jrtfWorkOA
    ode_modulesvue-loaderlibselector.js?type=script&index=0!F:jrtfWorkOAsrcviewsperformanceperson.vue
    * F:jrtfWorkOA
    ode_moduleshappypackloader.js?id=happybabel!F:jrtfWorkOAsrcviewsoverseaProducthousedatasource.js
        Used by 5 module(s), i. e.
        F:jrtfWorkOA
    ode_modulesabel-loaderlibindex.js!F:jrtfWorkOA
    ode_modulesvue-loaderlibselector.js?type=script&index=0!F:jrtfWorkOAsrcviewsoverseaProducthouseyuyueDetails.vue
     @ ./src/views/overseaProduct/house/dataSource.js
     @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/performance/person.vue
     @ ./src/views/performance/person.vue
     @ ./src/router/router.js
     @ ./src/main.js
     @ multi (webpack)-dev-server/client?http://192.168.1.198:8080 webpack/hot/dev-server @/main

     大致意思为:有多个模块的名称只在外壳中不同。

     这可能导致在具有其他大小写语义的文件系统上编译时出现意想不到的行为。
     
    经过一段时间这折腾发现项目中 在其他目录下也有一个重名的
    dataSource.js文件:
    在项目中全局搜索:

     改掉其中一个文件名就不会报这个警告了。

     现在控制台就没有警告了。

    附:在网上搜索错误解决方案时,发现当我们把  要引入的 文件名大小写, 写错时也会出现这样的警告。

    如果OrgTree组件是大写的,那么这样用会错:

    详见:

    https://blog.csdn.net/qq_40887780/article/details/91480094

    https://blog.csdn.net/weixin_41111068/article/details/84870341

    https://www.bbsmax.com/A/RnJWwlprJq/

  • 相关阅读:
    Shiro配置文件ini详解
    Shiro配置文件ini详解
    [转]shiro基础教程
    [转]shiro基础教程
    arguments.callee的作用
    [转] C# WPF Unable to add event handler
    [转] C# WPF Unable to add event handler
    springmvcajax json对象 用Map接受
    springmvcajax json对象 用Map接受
    json 对象字符串相互转化, js中
  • 原文地址:https://www.cnblogs.com/taohuaya/p/11481110.html
Copyright © 2011-2022 走看看