Search code examples
reactjsreact-three-fiber

Export 'unstable_act' (imported as 'React') was not found in 'react'


I developed an application with react-three-gui and @react-three/drei. After experimenting with the package.json, I was given the following error:

Error in question after changing the package.json file

Error in question after changing the package.json file

But despite everything, even after undoing my changes, the error remains.

Things I have tried:

  • deleting node modules and reinstalling (no changes)
  • undoing changes and going to previous commits (error remained even then)
  • deleting only react-three-fiber (react-three-gui throws an error)

I have spent days looking for a solution but can't find one that relates to this specific problem. Anything helps.

package.json

Picture of package.json


Solution

  • Was able to solve the problem by just creating a new react project, and transferring the code and 3d models I created to the new project. Once I reinstalled the necessary packages into the new project, everything started working again perfectly.