创建应用程序Webpack的多个模型问题

问题描述 投票:0回答:1

我正在运行一个create react app环境,当我编译时收到此警告,我很确定这是导致控制台出现其他问题的原因。这是我根本不了解的Waring。

Compiled with warnings.

./src/actions.js
  Line 1:10:  'CHANGE_SEARCH_FIELD' is defined but never used  no-unused-vars

(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:\Johann\robofriends\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!C:\Johann\robofriends\node_modules\webpack\buildin\global.js
    Used by 1 module(s), i. e.
    C:\Johann\robofriends\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!C:\Johann\robofriends\node_modules\node-libs-browser\node_modules\punycode\punycode.js
* C:\Johann\robofriends\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!C:\johann\robofriends\node_modules\webpack\buildin\global.js
    Used by 1 module(s), i. e.
    C:\Johann\robofriends\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!C:\johann\robofriends\node_modules\symbol-observable\es\index.js

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

我读过这个解决方案,但我似乎找不到类似的情况

Webpack: "there are multiple modules with names that only differ in casing" but modules referenced are identical

编辑:当我运行npm审核修复程序时,它无法解决此webpack问题,起初很好,但是当我开始构建自己的redux时,它开始崩溃。

javascript reactjs webpack redux create-react-app
1个回答
0
投票

这是一个linter错误,不允许使用未使用的变量。因此,请删除该变量或使用它,警告将消失。

© www.soinside.com 2019 - 2024. All rights reserved.