MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    using a library in a module

    Development
    2
    2
    117
    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.
    • T
      TomasF last edited by

      Hi,

      I’m trying to use https://github.com/onury/tasktimer, I can get it to work in node_helper but
      the module doesn’t see it. I’ve tried adding
      // Define required scripts.

      getScripts: function () {
        return ["modules/MMM-GooglePhotos/node_modules/tasktimer/lib/tasktimer.js"]
      },
      

      and using

      const timer = TaskTimer(1000)
      

      in a function but I get a TaskTimer not defined error.

      Any sugestions?

      -Tomas

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

        @tomasf i don’t know for certain, but you could open the developers window and look at the sources tab to see what was actually imported and setup…

        Sam

        Create a working config
        How to add modules

        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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy