MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. E3V3A
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    E
    Offline
    • Profile
    • Following 3
    • Followers 1
    • Topics 29
    • Posts 217
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: MMM-Tabulator: How to port HTML JS imports to node JS imports? [solved]

      From here:

      If the "nosniff" directive is received on a response received by a styleSheet reference, 
      Windows Internet Explorer will not load the "stylesheet" file unless the MIME type matches "text/css".
      
      If the "nosniff" directive is received on a response retrieved by a script reference, 
      Internet Explorer will not load the "script" file unless the MIME type matches one of the following values: 
      

      How do yo pass the correct MIME type in the MMM relevant node.js language?

      posted in Troubleshooting
      E
      E3V3A
    • MMM-Tabulator: How to port HTML JS imports to node JS imports? [solved]

      I’m trying to correctly import and use the Tabulator imports (that work fine from my HTML file) but refuses to load in the JS file. The getScripts and getStyles seem completely blind to my ./node_modules.

      My code is here.

      	getScripts: function() {
      		return [
      /*			"modules/MMM-tabulator/node_modules/jquery/dist/jquery.min.js",
      			"node_modules/jquery-ui-dist/jquery-ui.min.js",
      			"node_modules/jquery.tabulator/dist/js/tabulator.js",
      */		];
      	},
      
      	getStyles: function () {
      		return [
      /*			"node_modules/jquery-ui-dist/jquery-ui.css",
      			"node_modules/jquery.tabulator/dist/css/tabulator.css",
      */			"MMM-Tabulator.css",
      		];
      },
      

      I’ve tried just about every path possible but I get some security errors. Including some tricks to manually import files.

      The resource from node_modules was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)
      

      Any idea what’s going on?

      BTW: I’m totally lost (and new to this)!
      BTW2: Is this even the right place in the forum to post this? Or should it be in development part?

      posted in Troubleshooting
      E
      E3V3A
    • RE: How to check your config for errors. For absolute beginners.

      @strawberry-3.141 Yeah, Thanks. I saw that before, and have already added/corrected some Wiki info in the dev repo. (When is that dev gonna get merged to master, anyway?) Also looked at the Template… very useful.

      posted in Troubleshooting
      E
      E3V3A
    • RE: I got sucked up into a magic mirror! (and need some help)

      Alright! I’m about ready to throw in the towel! I’ve now been looking to do this, what some developers might think is trivial, and just can’t get anything to work, for several days.

      As a first step in my project, I made a nice demo table using the Tabulator library, but for some reason I am not able to get it into my MMM JS module. As soon as I think I’m starting to understand something I’m bombed out by weird errors!

      For example, I installed the jquery, jquery-ui and tabulator libraries with

      npm install xxxx --save
      

      as instructed on those pages. That means that I have the node_modules directory in my MMM directory.

      Now, trivially trying to import the various JS and CSS library files fails in the browser with:

      The resource from ... node_modules ... was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)
      

      Here you can find my Tabulator MMM demo called MMM-Tabulator. In that repo you will find a nicely working HTML/JS file: demo.html.

      How can I get that to work in the MMM-Tabulator.js ?

      posted in Development
      E
      E3V3A
    • RE: Controlling Embedded Youtube Video on MM

      @strawberry-3.141 Funny how the youtube URL renders within the code tags! :)

      posted in Troubleshooting
      E
      E3V3A
    • RE: How to check your config for errors. For absolute beginners.

      Being new to MM, JS, Node, etc myself, it would have been of great help to have some functional and pictorial description of the parts making up a MM Module. Basically an idiots-guide-to-making-your-own-module (and understanding what you are doing). I’d buy it!

      posted in Troubleshooting
      E
      E3V3A
    • I got sucked up into a magic mirror! (and need some help)

      I finally decided to get my hands dirty and make my own MM Module, after having hacked and looked at dozens of others. However, I have to humbly admit my huge lack of JS, Node development experience, something which is completely new to me. I need some advise.

      The project I’m doing will look simple and standard enough.

      • Has a multi-column (4-8) colored table.
      • Need updates every ~4 min
      • Uses a few external npm libraries: jquery, jquery-ui, tabulator, +another (to generate tables)
      • Uses an API request from another library to obtain the JSON to populate the table.

      That’s it, but I fail to see exactly where this fit’s into already similar MMM projects and templates.
      I already have the HTML + JS (+ external imported scripts) that generates the table, but I’m not able to get the JSON in from external node library, since it is only running locally on my browser and not yet on a server. It need to get integrated to MM “format” somehow.

      Maybe I’m going about this the wrong way? Maybe I’m totally trying to over-engineer it for what it is. (Using tabulator for simple table?) What is nice with tabulator is that it can sort and modify data in the table on-the-fly. But it also need all those dependencies above.

      I’ve been looking to use and modify https://github.com/erikmohn/MMM-Vindsiden which seem to have the essentials, but I’m don’t know what need to be removed and where to insert my own stuff…

      Any suggestions are most welcome!

      posted in Development
      E
      E3V3A
    • RE: Basic Core System of Magicmirror

      This would indeed be very helpful. To me its still all magic smoke and mirrors!

      posted in Tutorials
      E
      E3V3A
    • RE: How to Troubleshoot

      @Lexingtonian Thank you for that tip with npm run config:check. Should be in the dev docs…

      posted in Troubleshooting
      E
      E3V3A
    • RE: Trim the fat in a JSON file?

      @doubleT If you think there is an improvement that can be done to that module, perhaps file an issue or PR at the module repo? I’ve been looking at that module and wondering if it’s worthwhile using it, or rather just use something more complete as a template. What do you think?

      posted in Troubleshooting
      E
      E3V3A
    • 1
    • 2
    • 18
    • 19
    • 20
    • 21
    • 22
    • 21 / 22