DEV Community

loading...

Discussion on: How to integrate React frontend with Node backend

Collapse
_s_w_a_y_a_m_ profile image
Swayam Singh Author

during working with react-router-dom or sometimes normally data fetching or posting, if anyone of you gets this error:
" Unexpected token < in JSON at position 0 "

then don't panic if you followed the tutorial well and still seeing this, It's just a cache issue

Solution:
Delete the package-lock.json file and node_modules folder then run " npm install " to again install then
Now run your server again and the error will be gone 😇

Forem Open with the Forem app