javascript - 有多个模块的名称仅在外壳 React 上不同

标签 javascript reactjs

当我编译一个 react 项目时,我遇到了这个黄色的问题,但是接下来的事情让我很困扰

WARNING in ./node_modules/React/cjs/react.development.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:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\React\cjs\react.development.js Used by 1 module(s), i. e. C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\React\index.js * C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\react\cjs\react.development.js Used by 1 module(s), i. e. C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\react\index.js @ ./node_modules/React/cjs/react.development.js @ ./node_modules/React/index.js @ ./src/widgets/components/modal.js @ ./src/pages/containers/home.js @ ./src/entries_points/home.js @ multi (webpack)-dev-server/client?http://localhost:9000 ./src/entries_points/home.js

WARNING in ./node_modules/React/cjs/react.production.min.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:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\React\cjs\react.production.min.js Used by 1 module(s), i. e. C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\React\index.js * C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\react\cjs\react.production.min.js Used by 1 module(s), i. e. C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\react\index.js @ ./node_modules/React/cjs/react.production.min.js @ ./node_modules/React/index.js @ ./src/widgets/components/modal.js @ ./src/pages/containers/home.js @ ./src/entries_points/home.js @ multi (webpack)-dev-server/client?http://localhost:9000 ./src/entries_points/home.js

WARNING in ./node_modules/React/index.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:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\React\index.js Used by 1 module(s), i. e. C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\babel-loader\lib\index.js??ref--0!C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\src\widgets\components\modal.js * C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\react\index.js Used by 15 module(s), i. e. C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\node_modules\babel-loader\lib\index.js??ref--0!C:\cygwin64\home\waysolutions-soft\curso\nodejs\react\src\entries_points\home.js @ ./node_modules/React/index.js @ ./src/widgets/components/modal.js @ ./src/pages/containers/home.js @ ./src/entries_points/home.js @ multi (webpack)-dev-server/client?http://localhost:9000 ./src/entries_points/home.js

Web 浏览器中的项目运行完美,但我不知道如何纠正这个问题,我在 Windows 10 d: 上,我读到这是一个 Windows 问题,但我想修复它。 问候

最佳答案

您正在导入的类与导出的案例不同,请检查您的导入声明。

关于javascript - 有多个模块的名称仅在外壳 React 上不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48631497/

相关文章:

javascript - 从 javascript hashmap 迭代键为最后一个元素提供空字符串

javascript - 如何在代码更改时保持 Node 调试器连接

javascript - 如何在另一个页面上创建元素的居中弹出窗口

javascript - jQuery .change() 函数问题

javascript - 如何获取 child Prop

reactjs - prerender.io .htaccess 变量 - Reactjs CRA

javascript - JavaScript 中的字符串插值

reactjs - Jest 和 Enzyme 中的 "Cannot read property includes of undefined"错误

javascript - 调整 Material-UI <TextField> 大小会导致光标退出其容器

node.js - 使用外部 babel 配置会破坏 Node/React 应用程序 - 内部服务器错误