react 小问题分享
今天项目启动后报错,报错信息如下
react-refresh-runtime.development.js:465 Uncaught TypeError: Cannot read property 'forEach' of undefined
at Object.injectIntoGlobalHook (react-refresh-runtime.development.js:465)
at Object../node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js (ReactRefreshEntry.js:8)
at __webpack_require__ (bootstrap:851)
at fn (bootstrap:150)
at Object.1 (index.js:70)
at __webpack_require__ (bootstrap:851)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at main.chunk.js:1
解决方法就是关闭掉安装的react插件