redux 未捕获的引用错误:在初始化之前无法访问XXX(vitejs & react)

fjnneemd  于 2022-11-12  发布在  React
关注(0)|答案(1)|浏览(131)

我使用vite和reactjs,当我在代码中更改某些内容时,我看不到更改,我只看到页面refrech,没有呈现任何内容(白色页面),并且在控制台中显示错误。

helpers.ts:111 Uncaught ReferenceError: Cannot access 'ConnectedContext' before initialization
    at SignIn (index.tsx:54)
    at renderWithHooks (react-dom.development.js:14803)
    at updateFunctionComponent (react-dom.development.js:17034)
    at beginWork (react-dom.development.js:18610)
    at HTMLUnknownElement.callCallback2 (react-dom.development.js:188)
    at HTMLUnknownElement.sentryWrapped (helpers.ts:87)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
    at invokeGuardedCallback (react-dom.development.js:292)
    at beginWork$1 (react-dom.development.js:23203)
    at performUnitOfWork (react-dom.development.js:22154)
    at workLoopSync (react-dom.development.js:22130)
    at performSyncWorkOnRoot (react-dom.development.js:21756)
    at react-dom.development.js:11089
    at unstable_runWithPriority (scheduler.development.js:653)

有什么帮助吗?

qyzbxkaa

qyzbxkaa1#

很有可能,导入的模块之间存在循环依赖关系。
参见here的说明。

相关问题