step to detail:
I installed the xml2js dependency in my angular project which already had several installed
dependencies like sax and i couldn’t do the app build so i installed some dependencies for angular to recognize xml2js like:
npm install timers-browserify
npm install stream-browserify
furthermore i modified the tsconfig.json
but now I do ng serve the project and I get the following error:
Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
at sax.js:222
at Object../node_modules/xml2js/node_modules/sax/lib/sax.js (sax.js:1565)
at __webpack_require__ (bootstrap:79)
at Object.<anonymous> (parser.js:9)
at Object../node_modules/xml2js/lib/parser.js (parser.js:381)
at __webpack_require__ (bootstrap:79)
at Object.<anonymous> (xml2js.js:12)
at Object../node_modules/xml2js/lib/xml2js.js (xml2js.js:39)
at __webpack_require__ (bootstrap:79)
at Module../src/app/**/**/**/**.component.ts (main.js:5014)
```