fetch expects a URL. ../data.json is not a valid resource URL and hence it is not able to load it. Somehow you have to make data.json available over HTTP (either by putting it in your public directory or by creating a route). Only then fetch can load it.