• 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.

Any plan to replace "request" and "moment"?

Scheduled Pinned Locked Moved Unsolved Feature Requests
61 Posts 8 Posters 21.6k Views 8 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.
  • C Offline
    cowboysdude Module Developer @0m4r
    last edited by Sep 3, 2021, 11:16 AM

    @0m4r meh either way LOL

    1 Reply Last reply Reply Quote 0
    • B Offline
      BKeyport Module Developer @cowboysdude
      last edited by Sep 3, 2021, 8:43 PM

      @cowboysdude Been playing with changing over anyway (to luxon), and all I’ve been able to do for sure is make MM not come up at all.

      There needs to be MUCH better documentation on how to build out with external modules. It don’t make sense.

      The "E" in "Javascript" stands for "Easy"

      S 1 Reply Last reply Sep 3, 2021, 9:07 PM Reply Quote 0
      • S Offline
        sdetweil @BKeyport
        last edited by Sep 3, 2021, 9:07 PM

        @bkeyport explain more. externals are used in node_helper, and some can be used in module name.js as loaded by getScripts()

        if the lib shows useage as a < script … />
        link, then u can use it in getScripts

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        B 1 Reply Last reply Sep 3, 2021, 9:46 PM Reply Quote 0
        • B Offline
          BKeyport Module Developer @sdetweil
          last edited by Sep 3, 2021, 9:46 PM

          @sdetweil I’m trying to get luxon up and running.

          Supports Node.js 6+. Install via NPM:
          
          npm install --save luxon
          
          const { DateTime } = require("luxon");
          

          Do I need to use node_helper to get it going, then?

          https://moment.github.io/luxon/#/install

          The "E" in "Javascript" stands for "Easy"

          S 1 Reply Last reply Sep 3, 2021, 9:56 PM Reply Quote 0
          • S Offline
            sdetweil @BKeyport
            last edited by sdetweil Sep 3, 2021, 10:01 PM Sep 3, 2021, 9:56 PM

            @bkeyport require only works in node_helper

            Screenshot_20210903-150010_Chrome.jpg

            the doc also gives u a < script approach

            still npm install
            then getScripts to load the file from node_modules folder/luxon folder

            the use in modulename.js as shown for browser
            Screenshot_20210903-145848_Chrome.jpg

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            B 1 Reply Last reply Sep 4, 2021, 12:12 AM Reply Quote 0
            • B Offline
              BKeyport Module Developer @sdetweil
              last edited by Sep 4, 2021, 12:12 AM

              @sdetweil Oh, so I set up the require in node_helper, and use it accordingly in the main module script? Nice.

              The "E" in "Javascript" stands for "Easy"

              S 1 Reply Last reply Sep 4, 2021, 3:05 AM Reply Quote 0
              • S Offline
                sdetweil @BKeyport
                last edited by Sep 4, 2021, 3:05 AM

                @bkeyport no. one OR the other

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                B 1 Reply Last reply Sep 4, 2021, 3:21 AM Reply Quote 0
                • B Offline
                  BKeyport Module Developer @sdetweil
                  last edited by Sep 4, 2021, 3:21 AM

                  @sdetweil OK, I’m lost.

                  If Moment goes away, I’ll delete my modules.

                  The "E" in "Javascript" stands for "Easy"

                  S 1 Reply Last reply Sep 4, 2021, 3:36 AM Reply Quote 0
                  • S Offline
                    sdetweil @BKeyport
                    last edited by sdetweil Sep 4, 2021, 3:37 AM Sep 4, 2021, 3:36 AM

                    @bkeyport if you don’t have a node_helper, the you use the getScripts approach

                    if u have both, then u have to do both

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    B 1 Reply Last reply Sep 5, 2021, 1:28 AM Reply Quote 0
                    • B Offline
                      BKeyport Module Developer @sdetweil
                      last edited by Sep 5, 2021, 1:28 AM

                      @sdetweil

                      I give up.

                      Suggestion for the main app -

                      Create a date-time service that hides what library you’re using. If you decide to replace the library in the future, you’ll need to update only one file.

                      That way, we don’t have to move at all - just convert from accessing moment directly to accessing the internal service.

                      In the meantime, I’m indeed dropping it.

                      The "E" in "Javascript" stands for "Easy"

                      S 1 Reply Last reply Sep 5, 2021, 2:26 AM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 7
                      • 5 / 7
                      5 / 7
                      • First post
                        44/61
                        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