Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.0k views
in Technique[技术] by (71.8m points)

运行 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_Meyzcmu_appointment
ode_modulesVantesutilsvalidate
umber.js
    Used by 5 module(s), i. e.
    D:SYGT_Meyzcmu_appointment
ode_modulesVantesdatetime-pickerutils.js
* D:SYGT_Meyzcmu_appointment
ode_modulesvantesutilsvalidate
umber.js
    Used by 5 module(s), i. e.
    D:SYGT_Meyzcmu_appointment
ode_modulesvantesstepperindex.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_Meyzcmu_appointment
ode_modulesVantesutilsvalidatesystem.js
    Used by 2 module(s), i. e.
    D:SYGT_Meyzcmu_appointment
ode_modulesVantesaddress-editDetail.js
* D:SYGT_Meyzcmu_appointment
ode_modulesvantesutilsvalidatesystem.js
    Used by 2 module(s), i. e.
    D:SYGT_Meyzcmu_appointment
ode_modulesvantesaddress-editDetail.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_Meyzcmu_appointment
ode_modulesVantesutilsvnodes.js
    Used by 2 module(s), i. e.
    D:SYGT_Meyzcmu_appointment
ode_modulesVantesmixins
elation.js
* D:SYGT_Meyzcmu_appointment
ode_modulesvantesutilsvnodes.js
    Used by 2 module(s), i. e.
    D:SYGT_Meyzcmu_appointment
ode_modulesvantesmixins
elation.js

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

记录,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_Meyzcmu_appointment**node_modules**Vantesutilsvalidatesystem.js
    Used by 2 module(s), i. e.
    D:SYGT_Meyzcmu_appointment**node_modules**Vantesaddress-editDetail.js
* D:SYGT_Meyzcmu_appointment**node_modules**vantesutilsvalidatesystem.js
    Used by 2 module(s), i. e.
    D:SYGT_Meyzcmu_appointment**node_modules**vantesaddress-editDetail.js
提示为 node_modules 中的包大小写不一致,考虑到昨天更换电脑设备,因此怀疑问题出现在安装环境中,删除了 node_modules 使用 cnpm iinstall 重新安装,然后就没有报错了
**总结:**
    如果项目中初始安装依赖包时使用的时 cnpm 那么之后的项目统一使用 cnpm 安装依赖项,如果使用 npm 或 taobao 镜像安装可能会出现莫名其妙的报错

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...