react插件TypeError: Cannot read properties of undefined (reading 'forEach')
时间: 2023-10-15 13:26:42 浏览: 157
Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#Object‘的解决方法
出现react插件报错"TypeError: Cannot read properties of undefined (reading 'forEach')"的问题通常是因为在运行React项目时,代码中存在某些位置无法正确访问或处理数组的情况。根据引用和引用的描述,这个报错可能是由于使用了谷歌浏览器安装的React开发工具导致的。
解决这个问题的方法是修改依赖的js文件。根据引用中的描述,可以尝试找到该文件,并注释掉其中的一行代码。具体的文件路径是"/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js"。注释掉这行代码后,重新启动项目应该可以解决这个问题。
可以参考引用中提供的文章链接了解更多关于解决此问题的详细信息。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [react 谷歌浏览器报错:Uncaught TypeError: Cannot read properties of undefined (reading ‘forEach‘)](https://blog.csdn.net/u010234868/article/details/124380800)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [React启动后报错TypeError: Cannot read properties of undefined (reading ‘forEach‘)](https://blog.csdn.net/qq_40600414/article/details/121736055)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文