Read the statement by Michael Teeuw here.
MMM-CalendarWeek doesn't display
-
@DarrenO-0 said in MMM-CalendarWeek doesn't display:
: Cannot find module ‘request’
now
npm install request
In the folder of the module complainingand continue to repeat this process until the cannot find errors are gone
this is not a MagicMirror problem. it is a module problem.
-
@sdetweil
run how many times?
have run “npm install valid-url” ~20 times… no change in the error-log
even run “sudo npm install valid-url” and was prompted to update version of npm from 10.2.5 to 10.6.0, so updated accordingly, then re-ran “npm install valid-url” several more times and no change. -
@DarrenO-0 what folder where you in when you ran the command npm install
and if you followed the instructions correctly, then only once for each missing library
-
@sdetweil
in the MMM-CalendarWeek folder -
@DarrenO-0 show me the contents of the package.json file
-
@sdetweil
ahhh!!! Got it!
Had to run the following and restart MM each time until MM came up :
npm install request
npm install rrule-alt
npm install rrule (as rrule-alt is deprecated)The error log still reports that module rrule-alt cannot be found, but the calendar now displays.
thank you!
-
@sdetweil
cat package.json{ "name": "mmm-calendarweek", "version": "1.0.0", "description": "This calendar module for [Magic Mirror²](https://github.com/MichMich/MagicMirror) is functionally the same as the default calendar app, however its presentation is different as it uses week view. This module displays events from a public .ical calendar. It can combine multiple calendars. Note that calendars may not contain any entry before 1st January 1970, otherwise the calendar won't be displayed and the module will crash.", "main": "MMM-CalendarWeek.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "request": "^2.88.2", "rrule": "^2.8.1", "rrule-alt": "^2.2.8", "valid-url": "^1.0.9" } }
-
@DarrenO-0 yes and request is deprecated, and valid-url…
that’s why we removed them, cause the base node and electron support fetch, which does all that and more…
but the module could have supplied a package.json file and told you to run npm install to satisfy those code requirements
-
@DarrenO-0 yes now package.json lists the dependencies
-
please use code blocks around
config , css, json, or error listing’s