-1

Above is the code of the index.js file, below is the error shown in this file

I have tried solving this error in many ways, I have also updated the React and React DOM to version "react": "^18.0.0-rc.0", "react-dom": "^18.0.0-rc.0". I also tried deleting the node modules and re-installing node modules. Waiting for solutions. Also not able to understand these Chokidar errors.

1 Answers1

1

Try installing both react and react dom to latest stable v18 builds

npm i react@latest react-dom@latest

Additionally there's an error in your console about files being locked. Did you update the dependencies while the client was still running?

Shlomo H.
  • 36
  • 5
  • 1
    Thanks, Shlomo, it worked. I think I updated it while the client was running that's why there was an error. But now I updated after stopping the server and it worked. – karan galhotra Apr 11 '22 at 19:32