我有一个以 asp.net 核心作为后端的 react/redux。热模块替换正在工作,但不幸的是,在某些时候对反应组件的任何更改都会卸载页面并在控制台中崩溃:
[HMR] bundle rebuilding
client.js:207 [HMR] bundle rebuilt in 1141ms
client.js:199 [HMR] bundle rebuilding
client.js:207 [HMR] bundle rebuilt in 1976ms
process-update.js:27 [HMR] Checking for updates on the server...
vendor.js?v=Z8yGCzaP6rxOGgnos6PhMhr0V40qjsLRdHFCMY2G9u4:40 TypeError: Cannot
read property '_pendingForceUpdate' of undefined
at setPendingForceUpdate (index.js:20)
at traverseRenderedChildren (index.js:6)
at deepForceUpdate (index.js:40)
at AppContainer.componentWillReceiveProps (AppContainer.dev.js:45)
at s (vendor.js?v=Z8yGCzaP6rxOGgnos6PhMhr0V40qjsLRdHFCMY2G9u4:40)
at updateClassInstance (vendor.js?v=Z8yGCzaP6rxOGgnos6PhMhr0V40qjsLRdHFCMY2G9u4:40)
at beginWork (vendor.js?v=Z8yGCzaP6rxOGgnos6PhMhr0V40qjsLRdHFCMY2G9u4:40)
at i (vendor.js?v=Z8yGCzaP6rxOGgnos6PhMhr0V40qjsLRdHFCMY2G9u4:40)
at a (vendor.js?v=Z8yGCzaP6rxOGgnos6PhMhr0V40qjsLRdHFCMY2G9u4:40)
at w (vendor.js?v=Z8yGCzaP6rxOGgnos6PhMhr0V40qjsLRdHFCMY2G9u4:40)
该项目是从 ASP.NET Core+React+Redux 应用程序的 Visual Studio 模板创建的。
我还注意到,它没有附加到服务器端渲染,早些时候,如果出现问题,VS 在导致问题的行上中断,没有.NET 异常只是以纯文本形式返回给浏览器。
老实说,我什至不知道要开始对此设置进行故障排除,有什么提示吗?