运行 vue 项目时,警告”多个模块的名称只是大小写不同“

新手上路,请多包涵
 warning  in ./node_modules/Vant/es/utils/validate/number.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:\SYGT_Mey\zcmu_appointment\node_modules\Vant\es\utils\validate\number.js
    Used by 5 module(s), i. e.
    D:\SYGT_Mey\zcmu_appointment\node_modules\Vant\es\datetime-picker\utils.js
* D:\SYGT_Mey\zcmu_appointment\node_modules\vant\es\utils\validate\number.js
    Used by 5 module(s), i. e.
    D:\SYGT_Mey\zcmu_appointment\node_modules\vant\es\stepper\index.js

 warning  in ./node_modules/Vant/es/utils/validate/system.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:\SYGT_Mey\zcmu_appointment\node_modules\Vant\es\utils\validate\system.js
    Used by 2 module(s), i. e.
    D:\SYGT_Mey\zcmu_appointment\node_modules\Vant\es\address-edit\Detail.js
* D:\SYGT_Mey\zcmu_appointment\node_modules\vant\es\utils\validate\system.js
    Used by 2 module(s), i. e.
    D:\SYGT_Mey\zcmu_appointment\node_modules\vant\es\address-edit\Detail.js

 warning  in ./node_modules/Vant/es/utils/vnodes.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:\SYGT_Mey\zcmu_appointment\node_modules\Vant\es\utils\vnodes.js
    Used by 2 module(s), i. e.
    D:\SYGT_Mey\zcmu_appointment\node_modules\Vant\es\mixins\relation.js
* D:\SYGT_Mey\zcmu_appointment\node_modules\vant\es\utils\vnodes.js
    Used by 2 module(s), i. e.
    D:\SYGT_Mey\zcmu_appointment\node_modules\vant\es\mixins\relation.js

警告代码是这样的,换了一个电脑,重新安装环境然后运行就出现这种警告了

阅读 5k
2 个回答
✓ 已被采纳新手上路,请多包涵

记录,npm 中运行项目,警告:There are multiple modules with names that only differ in casing.

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:
***
**其中报错的功能模块为 node_modules 下引入的 node 包**
***
* D:\SYGT_Mey\zcmu_appointment\**node_modules**\Vant\es\utils\validate\system.js
    Used by 2 module(s), i. e.
    D:\SYGT_Mey\zcmu_appointment\**node_modules**\Vant\es\address-edit\Detail.js
* D:\SYGT_Mey\zcmu_appointment\**node_modules**\vant\es\utils\validate\system.js
    Used by 2 module(s), i. e.
    D:\SYGT_Mey\zcmu_appointment\**node_modules**\vant\es\address-edit\Detail.js
提示为 node_modules 中的包大小写不一致,考虑到昨天更换电脑设备,因此怀疑问题出现在安装环境中,删除了 node_modules 使用 cnpm iinstall 重新安装,然后就没有报错了
**总结:**
    如果项目中初始安装依赖包时使用的时 cnpm 那么之后的项目统一使用 cnpm 安装依赖项,如果使用 npm 或 taobao 镜像安装可能会出现莫名其妙的报错
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题