reactjs - 无法读取未定义的属性“类型”| 编译失败 - ReactApp
问题描述
当我尝试编译我的 React 应用程序时,我收到了这条消息:
我试图更新 npm,安装我能安装的一切,但它仍然无法正常工作......
就在那里,我的错误代码:
Uncaught Error: Module build failed: TypeError: Cannot read property 'type' of undefined
at isForInRef (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:406)
at variable.references.some.ref (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:443)
at Array.some (<anonymous>)
at isUsedVariable (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:442)
at collectUnusedVariables (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:565)
at collectUnusedVariables (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:572)
at Program:exit (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:617)
at listeners.(:3000/anonymous function).forEach.listener (/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/util/safe-emitter.js:47:58)
at Array.forEach (<anonymous>)
at Object.emit (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/util/safe-emitter.js:47)
at NodeEventGenerator.applySelector (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/util/node-event-generator.js:251)
at NodeEventGenerator.applySelectors (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/util/node-event-generator.js:280)
at NodeEventGenerator.leaveNode (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/util/node-event-generator.js:303)
at CodePathAnalyzer.leaveNode (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:630)
at CodePathAnalyzer.overrideLeaveNode (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint-plugin-node/lib/rules/process-exit-as-throw.js:127)
at Traverser.leave [as _leave] (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/linter.js:868)
at isForInRef (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:406)
at variable.references.some.ref (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:443)
at Array.some (<anonymous>)
at isUsedVariable (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:442)
at collectUnusedVariables (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:565)
at collectUnusedVariables (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:572)
at Program:exit (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/rules/no-unused-vars.js:617)
at listeners.(:3000/anonymous function).forEach.listener (/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/util/safe-emitter.js:47:58)
at Array.forEach (<anonymous>)
at Object.emit (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/util/safe-emitter.js:47)
at NodeEventGenerator.applySelector (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/util/node-event-generator.js:251)
at NodeEventGenerator.applySelectors (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/util/node-event-generator.js:280)
at NodeEventGenerator.leaveNode (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/util/node-event-generator.js:303)
at CodePathAnalyzer.leaveNode (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:630)
at CodePathAnalyzer.overrideLeaveNode (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint-plugin-node/lib/rules/process-exit-as-throw.js:127)
at Traverser.leave [as _leave] (:3000/Users/lucasgoncalves/GitHub Local/C-D-localhost/Client/node_modules/eslint/lib/linter.js:868)
at Object../src/layouts/popup.js (index.js:8)
at __webpack_require__ (bootstrap 67fb8c2d093d03f17433:678)
at fn (bootstrap 67fb8c2d093d03f17433:88)
at Object../src/pages/main.page.js (login.page.js:9)
at __webpack_require__ (bootstrap 67fb8c2d093d03f17433:678)
at fn (bootstrap 67fb8c2d093d03f17433:88)
at Object../src/App.js (fetch.js:461)
at __webpack_require__ (bootstrap 67fb8c2d093d03f17433:678)
at fn (bootstrap 67fb8c2d093d03f17433:88)
at Object../src/index.js (index.css?f255:26)
at __webpack_require__ (bootstrap 67fb8c2d093d03f17433:678)
at fn (bootstrap 67fb8c2d093d03f17433:88)
at Object.0 (store.js:215)
at __webpack_require__ (bootstrap 67fb8c2d093d03f17433:678)
at bootstrap 67fb8c2d093d03f17433:724
at bootstrap 67fb8c2d093d03f17433:724
我检查了我在 Stack 上找到的所有内容,但找不到可以帮助我解决此问题的主题...
感谢您的帮助,如果这种主题已经存在,我很抱歉,我之前找不到它:/
解决方案
推荐阅读
- r - 将数据框列拆分为多列
- c - 如何使用 fork 并无限期地等待运行子进程?
- python - Alexa 对唤醒词没有反应
- heroku - 为什么 heroku 中的 \d 不向我显示数据库中的表?
- reactjs - Heroku中的Http到Https重定向或如何安装react-https-redirect?
- ruby-on-rails - 如何将 Pundit 政策用于两种不同的模型?
- python - 从长纬度坐标和高程数据创建 tif 文件
- laravel - Laravel 关系 3 模型
- svelte - 如何比较 Svelte 3 中的道具变化
- sql - 有没有办法把这个case语句简化成更容易阅读的东西?