tsv file at path isn't found when running locally with Gatsby

23 Views Asked by At

Pulled a snippet out of my passion project because I cannot figure out why this file can't be found when running locally (Gatsby). Why is that not a valid path? My tsv file is in the same directory as the calling file. The tsv has 3 columns: time, stock, index

In the real project, useMarketData.js contains this snippet and the tsv and this file are both in src/

enter image description here

enter image description here

1

There are 1 best solutions below

0
Yuri G. On

You need to put the tsv file inside the static folder. Read the gatsby documentation for more details.