Read the statement by Michael Teeuw here.
Error with node fetch for calendar on fresh install
-
Hello.
After update, most of module cause some trouble from start. So, black screen…
I do a fresh install, without module, and i always have error on start :
[22.01.2022 22:41.16.390] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/pi/MagicMirror/node_modules/node-fetch/src/index.js from /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js not supported. Instead change the require of index.js in /home/pi/MagicMirror/modules/default/calendar/calendarfetcher.js to a dynamic import() which is available in all CommonJS modules.I can search on google, but i don’t find anything to resolve that… Do you have an idea ?
-
@landaisbenj don’t know. my upgrade script tries to take care of all the extra details
see
-
@landaisbenj never seen this using my install script
-
Ok si i could try with your script today. I follow instruction on documentation.
-
@landaisbenj move the existing mm folder out of the way if doing install
cd ~ mv MagicMirror MagicMirror.save -
OMG It’s really helpfull… Need to be the first way on documentation… Ok, it work, i try now to réinstall all my modules.
-
All my module work. Thanks a lot… I’m on this by a few day…
-
@landaisbenj I have seen this error before. It comes from installing the latest version of node-fetch whereas the module uses an older version of node-fetch. The latest version is an ES module and must be
import’d instead ofrequire’d in the node_helper. -
@mumblebaj but how did that happen? MM asks for newer, but module wants older?
-
@sdetweil I would assume that the user may have installed a newer version. MM requires 2.6.6 which is not the ES version I think they changed from v3 onwards.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login