首页 > 解决方案 > 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

标签: reactjswebpack

解决方案


推荐阅读