Uncaught (in promise) ReferenceError: FileAttachment is not defined.
Adi-11 opened this issue · comments
ADITYA commented
(async () => {
const file = d3.csvParse(
await FileAttachment("category-brands.csv").text(),
d3.autoType
);
data = file;
console.log(data);
})();
Giving Error: Uncaught (in promise) ReferenceError: FileAttachment is not defined.
Even after looking for all the resources, no solution was found!!
Philippe Rivière commented
FileAttachment is defined in https://github.com/observablehq/stdlib and mostly for use on https://observablehq.com ; to load files you can alternatively use fetch, or in the case of a CSV file, d3.csv.