How to import third party libraries in project?


Simple as that.

I can’t believe it is so difficult to import a simple npm module as


into a Stencil project.

I installed it and tried to use it with

import { rss-parser } from ‘rss-parser’

and a lot of different syntax for importing it. I just cant get it to work. What am I still doing wrong after 10 hours?
Is this a bundler problem or am I missing something else? Im pretty new to ionic/stencil.

Thanks for your help!


as the repo do not provide an example for proper import, you can try different things. For example entrys inside bracket pairs starts with uppercase. Import {Rss…

If you use visual code, then its makes life much more easier using extension that helps with imports like npm Intellisense, etc… If you use something different, then look their if they have something like that.

Best regards, anna-liebt


If i try this:

let Parser = require('rss-parser');
let parser = new Parser();

I get the Error:

Can’t find variable: require


I have the same problem with other libs… if you get it please let me know !




Thaks for the info… i test and works with the example… but with the lib that i have does not works