Read the statement by Michael Teeuw here.
MMM-SimpleBGSlideshow (yet another background slideshow module)
-
@magicinme all of THESE from node helper are dependencies
const express = require("express"); const Log = require("../../js/logger.js"); const FSPromises = require("fs/promises"); const pathModule = require("path");
and should be listed in the package.json, IN CASE one of them were to go away
as has happened in 2.15 and 2.16 with removal of request and associated packages
and ical and its co dependencies… -
@sdetweil how would package.json have a listed dependency for fs and path (included in Node) or MagicMirror’s logger? I suppose express is a dependency I could maintain independently, but I rely upon the MM expressInstance.
-
@magicinme do npm install --save in your module folder for those dependencies.
then let npm install for your module figure out where to resolve them
u might depend on the mm expess server INSTANCE but not the code to talk to that instance
-
@sdetweil what’s the purpose of installing core node features as a module? Looking at npm path it says "This is an exact copy of the NodeJS ’path’ module published to the NPM registry. "
Good point on express, I had thought I was just calling the express object but I do use express.static
-
@magicinme you may not ‘install’ it, as npm will resolve , but you document that you USE it, SO, if things change, you stuff still works…
I don’t know where stuff is packaged, and don’t want to know
-
@sdetweil perhaps this is why https://www.npmjs.com/package/fs gets a million downloads a week even though it does nothing. I believe including core modules in package.json presents an unnecessary security risk (i.e., npm path is controlled by an individual). Unless there’s a way to include a package in package.json as a comment?
-
@magicinme no comments in json.
whatever… I have given everything I know and my advice on helping insure users don’t encounter problems.
the high download counts are from build systems recreating the env from scratch…
not users
-
Does this module stretch images to fit the mirror? The original module had two different options for this, if I recall correctly
-
@robertybob I currently have it so that it uses the css “cover” attribute which stretches to fill. Is that what you want?
-
Hi MagicInMe,
Thank you for sharing your work!
I’ve installed MMM-SimpleBGSlideshow but for some reason the background stays black, I double-checked the images in the correct folder and i use the full path in the config as well:
{ module: 'MMM-SimpleBGSlideshow', position: 'fullscreen_below', config: { imagePaths: ['/home/pi/MagicMirror/modules/MMM-SimpleBGSlideshow/images'], slideshowSpeed: 15000, randomizeImageOrder: false, } },
but… no joy…
I clearly missing something basic here :)
I appreciate any thought!
Best,
Ram