reactjs - Webpack:“有多个模块的名称只是大小写不同”但引用的模块是相同的“但我找不到错字
问题描述
我正在使用 React 并得到这些错误,我发现其他人说这些错误是由于拼写错误造成的。但我找不到来源 - 错字。这是一个神秘的错误。我试过打开它列出的文件,但它们都是里面的node_modules
文件——不是我编码的文件。
我错过了什么?
webpackHotDevClient.js:138 C:/Users/benja/Documents/Udacity/Project-7/react-map/node_modules/object-assign/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:\Users\benja\Documents\Udacity\Project-7\react-map\node_modules\object-assign\index.js
Used by 1 module(s), i. e.
C:\Users\benja\Documents\Udacity\Project-7\react-map\node_modules\react-scripts\config\polyfills.js
* C:\Users\benja\documents\udacity\project-7\react-map\node_modules\object-assign\index.js
Used by 3 module(s), i. e.
C:\Users\benja\documents\udacity\project-7\react-map\node_modules\react\cjs\react.development.js
printWarnings @ webpackHotDevClient.js:138
handleWarnings @ webpackHotDevClient.js:155
./node_modules/react-dev-utils/webpackHotDevClient.js.connection.onmessage @ webpackHotDevClient.js:208
./node_modules/sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:51
(anonymous) @ main.js:278
./node_modules/sockjs-client/lib/main.js.SockJS._transportMessage @ main.js:276
./node_modules/sockjs-client/lib/event/emitter.js.EventEmitter.emit @ emitter.js:50
WebSocketTransport.ws.onmessage @ websocket.js:35
webpackHotDevClient.js:138 (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:\Users\benja\Documents\Udacity\Project-7\react-map\node_modules\webpack\buildin\global.js
Used by 23 module(s), i. e.
C:\Users\benja\Documents\Udacity\Project-7\react-map\node_modules\sockjs-client\lib\entry.js
* C:\Users\benja\documents\udacity\project-7\react-map\node_modules\webpack\buildin\global.js
Used by 2 module(s), i. e.
C:\Users\benja\documents\udacity\project-7\react-map\node_modules\symbol-observable\es\index.js
printWarnings @ webpackHotDevClient.js:138
handleWarnings @ webpackHotDevClient.js:155
./node_modules/react-dev-utils/webpackHotDevClient.js.connection.onmessage @ webpackHotDevClient.js:208
./node_modules/sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:51
(anonymous) @ main.js:278
./node_modules/sockjs-client/lib/main.js.SockJS._transportMessage @ main.js:276
./node_modules/sockjs-client/lib/event/emitter.js.EventEmitter.emit @ emitter.js:50
WebSocketTransport.ws.onmessage @ websocket.js:35
webpackHotDevClient.js:138 (webpack)/buildin/module.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:\Users\benja\Documents\Udacity\Project-7\react-map\node_modules\webpack\buildin\module.js
Used by 3 module(s), i. e.
C:\Users\benja\Documents\Udacity\Project-7\react-map\node_modules\node-libs-browser\node_modules\punycode\punycode.js
* C:\Users\benja\documents\udacity\project-7\react-map\node_modules\webpack\buildin\module.js
Used by 2 module(s), i. e.
C:\Users\benja\documents\udacity\project-7\react-map\node_modules\lodash\isBuffer.js
解决方案
推荐阅读
- android - 单独的开发和生产崩溃报告
- java - 当我们访问实例变量时,JVM会创建一个新的引用吗?
- ruby - 如何将变量从一种方法访问到ruby中的另一种方法?
- python - 为什么我不能用 range() 打印一个随机整数 numpy 数组
- bash - 我想验证我的设置(manifest.jps)的占位符是否已设置或不在我的 bash 中使用它们(bash 在清单中调用)
- yaml - 使用 libyaml 解析树状结构
- c++ - C++函数链返回函数
- android - Icon.button 正在工作,但 Icon.ToolbarAndroid 在本机反应中不起作用
- javascript - 解析数组并将值转换为对象
- excel - 查找与关键字匹配的每一行,然后粘贴找到关键字的所有行