threedayAAAAA / vite-plugin-circular-dependency

Detect circular dependencies
MIT License
34 stars 2 forks source link

react-dom.development.js:20662 Uncaught Error: Cannot read properties of null (reading 'useState') #2

Closed snake-py closed 2 weeks ago

snake-py commented 1 year ago

I was sitting on this for some time now and it seems this error, was caused by this plugin:

react-dom.development.js:20662 Uncaught Error: Cannot read properties of null (reading 'useState')
    at updateDehydratedSuspenseComponent (react-dom.development.js:20662:17)
    at updateSuspenseComponent (react-dom.development.js:20362:16)
    at beginWork (react-dom.development.js:21624:14)
    at beginWork$1 (react-dom.development.js:27426:14)
    at performUnitOfWork (react-dom.development.js:26557:12)
    at workLoopSync (react-dom.development.js:26466:5)
    at renderRootSync (react-dom.development.js:26434:7)
    at performConcurrentWorkOnRoot (react-dom.development.js:25738:74)
    at workLoop (scheduler.development.js:266:34)
    at flushWork (scheduler.development.js:239:14)

Here is a minimal repo: https://github.com/snake-py/minimal-vps-react-issue

I use a custom react component library and inside a project which uses SSR via vite-plugin-ssr it went overboard.

Here you can find addtional information: https://github.com/brillout/vite-plugin-ssr/discussions/1101#discussioncomment-6882890

threedayAAAAA commented 1 year ago

Thank you very much for using our repository. However, when I followed the steps you provided in https://github.com/snake-py/minimal-vps-react-issue, I couldn't find the "react-vite-app" directory. It seems that the repository only contains an empty folder called "vite-ssr-project". I am unable to reproduce the issue based on the steps you provided. Could you please provide more detailed instructions for reproduction? Thank you very much. @snake-py

snake-py commented 1 year ago

@threedayAAAAA I am sorry it seemed that I pushed one folder as sub module. Now everything should be there to reproduce it.

snake-py commented 1 year ago

@threedayAAAAA were you able to reproduce the issue?

threedayAAAAA commented 2 weeks ago

I can't reproduce this problem

image image