Hey, im trying to use feedparser module but im getting an invalid module error. The require resolve seems to work fine but i some error pop ups when im trying to use it. Feedparser
Welcome to the forum, @Obalfour!
You clearly know more JS than me, so Iâm writing mostly for support.
Your notebook looks like itâs trying to ensure that youâre always using the latest version of a module. If thatâs the case, you can get the equivalent just by naming the module:
fp = require('https://bundle.run/feedparser')
⊠Your error seems to result from the trailing index.js
in how your URL resolves with âlatestâ.
To pin to the specific module, you can do this:
fp = require('https://bundle.run/feedparser@2.2.10')
Does this help?
hi @Obalfour I guess, youâre trying to use a nodejs package on the browser, unfortunately they didnât provide a browser compatible version.
However if youâre looking into parse a RSS feed using Observable you could use a browser friendly package, such as rss-parser
Here is an example parsing NYT home page feed.
Thank you very much @aaronkyle @radames you answers had been really helpful to me, Iâm now using rss-parser in my notebook