Feedparser gets Me: Invalid Module [ERROR]

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

1 Like

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