When i run the npm run dev function following error is printed on the console

185 Views Asked by At

error ./node_modules/@radix-ui/react-compose-refs/dist/index.mjs Attempted import error: 'useCallback' is not exported from 'react' (imported as '$3vqmr$useCallback'). does anyone know how to fix this issue

i have tried various solutions from chatgpt nothing worked

1

There are 1 best solutions below

0
Bhavesh Kumar Sharma On

I was getting the same error after I had run the command "npm run build" in my Next js 13 project, I did 2 things

1.

Delete the build folder

and run your project again, this will eliminate all the above mentioned errors. OR

  1. If you are using VS Code, press Ctrl+Shift+P and write restart and press enter, most of the errors will be gone.

These steps worked for me, hope they work for you as well.

Thanks :)