MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Error Node_helper custome Module

    Scheduled Pinned Locked Moved Development
    6 Posts 2 Posters 397 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sdetweil @Chiiki58
      last edited by sdetweil

      @Chiiki58 where are you building this module?? are the files located in a folder off the MagicMirror/modules folder??

      we create alias entries to the includes for some things…

      so your files have to be in the right place…

      pupetteer is really about executing a web page, clicking, scrolling

      you shouldn’t need that I don’t think…

      cheerio will let you extract parts of the page and
      https://www.npmjs.com/package/cheerio
      https://www.npmjs.com/package/html-to-json-parser
      html_to_json to convert them to json

      also, see my sampleModule that has working node_helper.js
      https://github.com/sdetweil/SampleModule

      also, names matter… MagicMirror is case sensitive

      and the link to the doc for module creators
      https://docs.magicmirror.builders/development/introduction.html

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @sdetweil
        last edited by sdetweil

        @Chiiki58 also note the required files

        module_name(in config.js) = folder_name = filename.js = register inside this file
        all MUST MATCH exactly

        your .js doesn’t have the register

        css file name has to match the return from

        getStyles: function

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          Chiiki58 @sdetweil
          last edited by

          @sdetweil Yeah of course I have everything in the right folder with the right name

          I also had cheerio installed, I’ll have to check it out

          I’ll try it with httptojson

          Thank you very much, Sam

          1 Reply Last reply Reply Quote 0
          • C Offline
            Chiiki58
            last edited by

            It works, thank you very much for the input. I’ll probably upload it to GIT once I get the layout right. Now I’ve just unstructured all the text from the website

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @Chiiki58
              last edited by

              @Chiiki58 awesome, glad you’re making progress.

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy