I've been working on a project that outputs xml upon reading a csv, I use the fs.createReadStream()
method to read the csv file but after some time, the terminal just crashes.
And I get
C:\Users\username\Documents\Programming\Node Projects\DAE Parser\main.js:13
row["Value"].includes("tri") ||
^
TypeError: Cannot read property 'includes' of undefined
It doesn't read the whole file.
here's what i'm doing
fs.createReadStream("test.csv")
.pipe(csv())
.on("data", row => {
if (
row["Value"].includes("tri") ||
row["Value"].includes("vt") ||
row["Value"].includes("vx") ||
row["Value"].includes("vn")
) {
console.log(row)
}
})