• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

using a library in a module

Scheduled Pinned Locked Moved Development
2 Posts 2 Posters 297 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.
  • T Offline
    TomasF
    last edited by Jun 25, 2021, 8:54 PM

    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 Jun 25, 2021, 10:08 PM Reply Quote 0
    • S Away
      sdetweil @TomasF
      last edited by Jun 25, 2021, 10:08 PM

      @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

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      1 / 1
      • First post
        1/2
        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