<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I have several failing with the “Cannot find module ‘node-fetch’” error. (see trace below)<br />
I have seen this with similar other (older) modules, and sadly I have not been able to fix this.</p>
<p dir="auto"><a href="https://github.com/alonsourbano/publika" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/alonsourbano/publika</a><br />
<a href="https://github.com/ZakarFin/mm-hsl-timetable" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/ZakarFin/mm-hsl-timetable</a><br />
<a href="https://github.com/cSharpBastard/mmm-nordic-electrical-spot-prices" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/cSharpBastard/mmm-nordic-electrical-spot-prices</a></p>
<p dir="auto">Browsing the forums, there seems to be similar issues with other modules after the MM 2.25.0 version.</p>
<p dir="auto">Things tried (which I can recall):</p>
<ul>
<li>npm install of that missing ‘node-fetch’<br />
<a href="https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later?page=1">https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later?page=1</a></li>
<li>Fresh MM installations with Node.js version 20<br />
<a href="https://github.com/nodesource/distributions" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/nodesource/distributions</a></li>
<li>downgrading to Node.js version 18</li>
</ul>
<p dir="auto">All with similar results. Any advice appreciated, thanks!</p>
<p dir="auto">Respectfully,<br />
Saku</p>
<pre><code>&gt; magicmirror@2.25.0 start
&gt; DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js

[05.10.2023 22:14.53.083] [LOG]   Starting MagicMirror: v2.25.0
[05.10.2023 22:14.53.090] [LOG]   Loading config ...
[05.10.2023 22:14.53.092] [DEBUG] config template file not exists, no envsubst
[05.10.2023 22:14.53.097] [LOG]   Loading module helpers ...
[05.10.2023 22:14.53.099] [LOG]   No helper found for module: alert.
[05.10.2023 22:14.53.148] [LOG]   Initializing new module helper ...
[05.10.2023 22:14.53.149] [LOG]   Module helper loaded: updatenotification
[05.10.2023 22:14.53.150] [LOG]   No helper found for module: clock.
[05.10.2023 22:14.53.151] [LOG]   No helper found for module: compliments.
[05.10.2023 22:14.53.208] [LOG]   Initializing new module helper ...
[05.10.2023 22:14.53.209] [LOG]   Module helper loaded: MMM-OpenWeatherMapForecast
[05.10.2023 22:14.53.234] [ERROR] (node:7772) UnhandledPromiseRejectionWarning: Error: Cannot find module 'node-fetch'
Require stack:
- /home/saku/MagicMirror/modules/publika/node_helper.js
- /home/saku/MagicMirror/js/app.js
- /home/saku/MagicMirror/js/electron.js
- /home/saku/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
- 
    at node:internal/modules/cjs/loader:1084:15
    at Function.&lt;anonymous&gt; (node:electron/js2c/browser_init:2:117500)
    at Module._resolveFilename (/home/saku/MagicMirror/node_modules/module-alias/index.js:49:29)
    at node:internal/modules/cjs/loader:929:27
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.&lt;anonymous&gt; (/home/saku/MagicMirror/modules/publika/node_helper.js:3:15)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)
    at Object..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at node:internal/modules/cjs/loader:967:12
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at loadModule (/home/saku/MagicMirror/js/app.js:180:19)
(Use `electron --trace-warnings ...` to show where the warning was created)

</code></pre>
]]></description><link>https://forum.magicmirror.builders/topic/18055/cannot-find-module-node-fetch-error-with-multiple-mm-modules</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 23:44:30 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/18055.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 05 Oct 2023 19:32:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Thu, 05 Oct 2023 19:53:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/blackbull" aria-label="Profile: blackbull">@<bdi>blackbull</bdi></a> yes, I saw someone else with the same problem</p>
<p dir="auto">it was the node-fetch version</p>
<p dir="auto">do this</p>
<pre><code>npm install node-fetch@2
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/111396</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/111396</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 05 Oct 2023 19:53:20 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Sun, 12 Jan 2025 12:10:48 GMT]]></title><description><![CDATA[<p dir="auto">merci ca fonctionne maintenant!</p>
]]></description><link>https://forum.magicmirror.builders/post/122949</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122949</guid><dc:creator><![CDATA[myayo001]]></dc:creator><pubDate>Sun, 12 Jan 2025 12:10:48 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Sat, 11 Jan 2025 23:29:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/myayo001" aria-label="Profile: myayo001">@<bdi>myayo001</bdi></a> Just remove the the line <code>const fetch = require("fetch");</code> in the file <code>node-helper.js</code> in the module’s directory.</p>
]]></description><link>https://forum.magicmirror.builders/post/122920</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122920</guid><dc:creator><![CDATA[KristjanESPERANTO]]></dc:creator><pubDate>Sat, 11 Jan 2025 23:29:12 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Sat, 11 Jan 2025 21:12:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bugsounet" aria-label="Profile: bugsounet">@<bdi>bugsounet</bdi></a>  je n 'ai pas trop compris ce que je devais faire.<br />
mais j’ai bien node v20</p>
<p dir="auto">Mirror $ node -v</p>
<p dir="auto">v20.18.1</p>
]]></description><link>https://forum.magicmirror.builders/post/122906</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122906</guid><dc:creator><![CDATA[myayo001]]></dc:creator><pubDate>Sat, 11 Jan 2025 21:12:09 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Sat, 11 Jan 2025 21:06:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> cela arrive quand la version principale de node est v10.x et que l’utilisateur demande la version v20  ou v22 avec la commande <code>n</code></p>
<p dir="auto">généralement resolu avec la version principale de node en v20. ensuite on peux utiliser <code>n</code> comme on a envie</p>
]]></description><link>https://forum.magicmirror.builders/post/122903</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122903</guid><dc:creator><![CDATA[bugsounet]]></dc:creator><pubDate>Sat, 11 Jan 2025 21:06:07 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Sat, 11 Jan 2025 20:57:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a>  oui j’ai vu le post je dois installer npm install node-fetch@2<br />
je l’ai installer dans le dossier MMM-moonraker et j’ai toujours l’erreur</p>
]]></description><link>https://forum.magicmirror.builders/post/122905</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122905</guid><dc:creator><![CDATA[myayo001]]></dc:creator><pubDate>Sat, 11 Jan 2025 20:57:17 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Sat, 11 Jan 2025 20:52:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/myayo001" aria-label="Profile: myayo001">@<bdi>myayo001</bdi></a> did you see this above</p>
<p dir="auto"><a href="https://forum.magicmirror.builders/post/111396">https://forum.magicmirror.builders/post/111396</a></p>
]]></description><link>https://forum.magicmirror.builders/post/122901</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122901</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 11 Jan 2025 20:52:33 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Sat, 11 Jan 2025 20:47:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/blackbull" aria-label="Profile: blackbull">@<bdi>blackbull</bdi></a> j’ai le meme soucis. quand tu dis le dossier spécifique du module, c’est par exemple dans MMM-moonraker ou dans MMM-moonraker/node_modules?</p>
<p dir="auto">Merci d’avance.</p>
]]></description><link>https://forum.magicmirror.builders/post/122900</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/122900</guid><dc:creator><![CDATA[myayo001]]></dc:creator><pubDate>Sat, 11 Jan 2025 20:47:15 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Thu, 05 Oct 2023 20:21:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> YES! Big thanks! :)</p>
<p dir="auto">That needed to be run in the specific module folder, installing that in MM base did not work.</p>
<p dir="auto">Respectfully,<br />
Saku</p>
]]></description><link>https://forum.magicmirror.builders/post/111397</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/111397</guid><dc:creator><![CDATA[blackbull]]></dc:creator><pubDate>Thu, 05 Oct 2023 20:21:12 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Thu, 05 Oct 2023 19:53:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/blackbull" aria-label="Profile: blackbull">@<bdi>blackbull</bdi></a> yes, I saw someone else with the same problem</p>
<p dir="auto">it was the node-fetch version</p>
<p dir="auto">do this</p>
<pre><code>npm install node-fetch@2
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/111396</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/111396</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 05 Oct 2023 19:53:20 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Thu, 05 Oct 2023 19:50:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a></p>
<p dir="auto">Thanks for info and pointers! Did the NPM install in base, but ended into a new obstacle.</p>
<p dir="auto">BR,<br />
Saku</p>
<pre><code>[05.10.2023 22:47.23.542] [ERROR] (node:8355) UnhandledPromiseRejectionWarning: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/saku/MagicMirror/modules/publika/node_modules/node-fetch/src/index.js from /home/saku/MagicMirror/modules/publika/node_helper.js not supported.
Instead change the require of index.js in /home/saku/MagicMirror/modules/publika/node_helper.js to a dynamic import() which is available in all CommonJS modules.
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at Object.&lt;anonymous&gt; (/home/saku/MagicMirror/modules/publika/node_helper.js:3:15)
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at loadModule (/home/saku/MagicMirror/js/app.js:180:19)
    at loadModules (/home/saku/MagicMirror/js/app.js:210:10)
    at async App.start (/home/saku/MagicMirror/js/app.js:258:3)
(Use `electron --trace-warnings ...` to show where the warning was created)

</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/111395</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/111395</guid><dc:creator><![CDATA[blackbull]]></dc:creator><pubDate>Thu, 05 Oct 2023 19:50:23 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot find module &#x27;node-fetch&#x27; error with multiple MM modules on Thu, 05 Oct 2023 19:40:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/blackbull" aria-label="Profile: blackbull">@<bdi>blackbull</bdi></a>  we remove node fetch from the magic mirror package on this release as we drop back to the integrated fetch that’s provided in node and in the electron browser unfortunately that breaks a bunch of modules.</p>
<p dir="auto">So you can either NPM install it in every module that needs it or you can an NPM install it in the base once for all the modules</p>
]]></description><link>https://forum.magicmirror.builders/post/111393</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/111393</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 05 Oct 2023 19:40:57 GMT</pubDate></item></channel></rss>