this.removeAllListeners is not a function
devmanzur opened this issue · comments
Manzur Alahi commented
here is my function
async function parseXML(xmlContent: string): Promise<{ [key: string]: string }[]> {
const parser = new xml2js.Parser({ explicitArray: true });
const parsedData = await parser.parseStringPromise(xmlContent);
const rowData = parsedData.DATAPACKET.ROWDATA[0].ROW;
const rowsKeyValue: { [key: string]: string }[] = [];
rowData.forEach((row: any) => {
if (row != undefined) {
const attributes: { [key: string]: string } = {};
for (const key in row.$) {
attributes[key] = row.$[key];
}
rowsKeyValue.push(attributes);
}
});
return rowsKeyValue;
}
Jason commented
What was the fix?
Yaroslav Tymchenko commented
@devmanzur @jasonhutton-sd Any updates? I got this error too and a little confused
Arif Amirani commented
Solution is here:
Paul D commented
If it helps, this error appeared after I upgraded my project from vite 3.2.7 to vite 5.0.2.
npm i events
as per @kontinuity 's link solved it.
jt commented
If it helps, this error appeared after I upgraded my project from vite 3.2.7 to vite 5.0.2.
npm i events
as per @kontinuity 's link solved it.
thats worked for me, tks