Add module issue


#1

hi i try to add module
but have issue because show xxx “is not defined”.
how to init module and use in jovo ?

here the code from app.js:

'use strict';

// Get soundcloud

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

(async () => {
    let semaine = await parser.parseURL(
        "http://feeds.soundcloud.com/sounds.rss"
    );
    
})();

console.log(semaine)

// ------------------------------------------------------------------
// APP INITIALIZATION
// ------------------------------------------------------------------

const {
    App
} = require('jovo-framework');
const {
    Alexa
} = require('jovo-platform-alexa');
const {
    JovoDebugger
} = require('jovo-plugin-debugger');
const {
    FileDb
} = require('jovo-db-filedb');

#3

Have you tried it like explained in the rss-parser docs?

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

#4

yes, as you can see on my first code …

issue is not when work alone, but when include in jovo project


#5

oh, I only saw the second one. what do you mean with show xxx is not defined? Is it a problem with the instantiation, like, is the whole semaine variable not defined, or something else?


#6

yes variable is not defined,
but i have add rss-parser in package.json as dependencies.


#7

Have you tried adding the parsing functionality to an intent like LAUNCH for troubleshooting?


#8

yes, it’ same issue


#9

I meant adding it to an intent, like:

async LAUNCH() {
    let semaine = await parser.parseURL(
        "http://feeds.soundcloud.com/sounds.rss"
    );
    console.log(semaine);
   
},


#10

good news, it’s now ok. thank you


#11

Great, closing this now


closed #12