Broken on webpack 5
Because webpack 5 does not bundle node polyfills by default this package is broken for build systems with webpack 5.
I tried polyfilling by using tsconfig compilerOptions but you cannot polyfill modules required by dependencies of this module.
Workaround: use a bundle from /dist
How should I use the workaround? I added node_modules/rss-parser/dist/rss-parser.min.js to the scripts section in angular.json, but it still complains.
Edit:
Found it!
It's not nessecery to add it to angular.json. Changing import * as Parser from 'rss-parser' to import Parser from '../../../node_modules/rss-parser/dist/rss-parser.min'; worked.
Hmmm. I encounter the same problem - but if I try to import in my angular project using
import Parser from '../../../../node_modules/rss-parser/dist/rss-parser.min';
then I get an "Could not find a declaration file for module" Error.
Any hints ? What could be different on my setup?
Hmmm. I encounter the same problem - but if I try to import in my angular project using
import Parser from '../../../../node_modules/rss-parser/dist/rss-parser.min';then I get an "Could not find a declaration file for module" Error. Any hints ? What could be different on my setup?
Simply add // @ts-ignore above the import line.
Using import Parser from 'rss-parser/dist/rss-parser'; in an Angular project worked for me.