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 😇
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 😇