This error occurred when trying to fetch a local json file:
How I fixed this.

Put the json data file (or folder containing the json data files) in the public directory of your react project and try to fecth again.
Further Reading
https://stackoverflow.com/questions/37269808/react-js-uncaught-in-promise-syntaxerror-unexpected-token-in-json-at-posit
https://docs.microsoft.com/answers/questions/449617/syntaxerror-unexpected-token-lt-in-json-at-positio.html
Top comments (0)