I have a CSV file in the same directory as my React app that I am trying to read with Javascript. I am using Papaparse to parse the CSV file.
Here is my code:
Papa.parse("./headlines.csv", {
download: true,
complete: function(results, file) {
console.log("Parsing complete:", results, file);
}
})
My issue is that when I try to parse the file, all that gets returned is the HTML code for the index.html
file in my React app.