<?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[Fetch is not a function]]></title><description><![CDATA[<p dir="auto">Dear all,</p>
<p dir="auto">I have just update to 2.20.0 on an Ubuntu 20.04.3 LTS.</p>
<p dir="auto">The news feed states “Geen nieuws op dit moment” sorry Dutch version, translated: “no news at this moment”.</p>
<p dir="auto">The mm-error.log states “fetch is not a function” at fetchNews (/home/…/modules/default/newsfeed/newsfeedfetcher.js:88:3)</p>
<p dir="auto">The changes for 2.20.0 by MichMich state:<br />
<em>Use internal fetch function of node instead external node-fetch library if used node version &gt;= v18.</em></p>
<p dir="auto">node -v results in V14.19.3.</p>
<p dir="auto">I think I am almost at solving the problem, but I am also way out of my depth here.</p>
<p dir="auto">How do I get the newsfeed to “fetch” again on an Ubuntu 20.04.3 LTS mirror?<br />
Help is apreciated.</p>
<p dir="auto">Kind Regards,</p>
<p dir="auto">Hein-Jan</p>
<p dir="auto">Sorry. Made a mess of package.json and package-lock.json files, and subsequently made a mess of the update.<br />
Problem has been solved.</p>
]]></description><link>https://forum.magicmirror.builders/topic/16945/fetch-is-not-a-function</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 20:31:51 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/16945.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 03 Jul 2022 14:33:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fetch is not a function on Mon, 11 Jul 2022 06:15:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hein-jan" aria-label="Profile: Hein-Jan">@<bdi>Hein-Jan</bdi></a> update fails if any of our files are changed.</p>
<p dir="auto">git status will show you the changed files, if any</p>
<p dir="auto">git diff will show you WHAT changed in each changed file…</p>
<p dir="auto">package-lock is regenerated, and thus changed</p>
<p dir="auto">package.json is usually not changed, but needs to be for windows and pi0w.<br />
you cannot restore the older package.json onto the newer release, as it contains the version info for the mm dependencies which change every release.</p>
<p dir="auto">I recommend using my upgrade script.<br />
see <a href="https://github.com/sdetweil/MagicMirror_scripts" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/sdetweil/MagicMirror_scripts</a><br />
it will call out the changes and save them if need be (if u say yes).</p>
<p dir="auto">but that explains the trouble, mismatched dependencies…</p>
]]></description><link>https://forum.magicmirror.builders/post/102782</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/102782</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 11 Jul 2022 06:15:03 GMT</pubDate></item><item><title><![CDATA[Reply to Fetch is not a function on Mon, 11 Jul 2022 17:02:00 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 the clarification. Will try the script next time.</p>
<p dir="auto">Hein-Jan</p>
]]></description><link>https://forum.magicmirror.builders/post/102790</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/102790</guid><dc:creator><![CDATA[Hein-Jan]]></dc:creator><pubDate>Mon, 11 Jul 2022 17:02:00 GMT</pubDate></item><item><title><![CDATA[Reply to Fetch is not a function on Mon, 11 Jul 2022 11:28:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mmrize" aria-label="Profile: MMRIZE">@<bdi>MMRIZE</bdi></a> node 16 is acceptable.</p>
]]></description><link>https://forum.magicmirror.builders/post/102786</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/102786</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 11 Jul 2022 11:28:52 GMT</pubDate></item><item><title><![CDATA[Reply to Fetch is not a function on Mon, 11 Jul 2022 08:47:27 GMT]]></title><description><![CDATA[<p dir="auto">You need to update node version at least v18.<br />
I recommend using nvm to manage node versions.</p>
]]></description><link>https://forum.magicmirror.builders/post/102785</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/102785</guid><dc:creator><![CDATA[MMRIZE]]></dc:creator><pubDate>Mon, 11 Jul 2022 08:47:27 GMT</pubDate></item><item><title><![CDATA[Reply to Fetch is not a function on Mon, 11 Jul 2022 06:15:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hein-jan" aria-label="Profile: Hein-Jan">@<bdi>Hein-Jan</bdi></a> update fails if any of our files are changed.</p>
<p dir="auto">git status will show you the changed files, if any</p>
<p dir="auto">git diff will show you WHAT changed in each changed file…</p>
<p dir="auto">package-lock is regenerated, and thus changed</p>
<p dir="auto">package.json is usually not changed, but needs to be for windows and pi0w.<br />
you cannot restore the older package.json onto the newer release, as it contains the version info for the mm dependencies which change every release.</p>
<p dir="auto">I recommend using my upgrade script.<br />
see <a href="https://github.com/sdetweil/MagicMirror_scripts" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/sdetweil/MagicMirror_scripts</a><br />
it will call out the changes and save them if need be (if u say yes).</p>
<p dir="auto">but that explains the trouble, mismatched dependencies…</p>
]]></description><link>https://forum.magicmirror.builders/post/102782</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/102782</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Mon, 11 Jul 2022 06:15:03 GMT</pubDate></item><item><title><![CDATA[Reply to Fetch is not a function on Mon, 11 Jul 2022 05:50:49 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">I always struggle with the updates. The first time it fails because it tells me to store a package.json and and a package-lock.json. I renamed them by adding “_old”. The second time the updated ran its course.<br />
As i am ignorant, the I renamed the new package.json and package-lock.json by adding “_new”, and renamed the “_old” ones into the package.json and package-lock.json.<br />
Then I ran the npm install.<br />
That’s when I ran into trouble and called for help.<br />
Further study of the log showed me that I was still running 2.17, which indicated something had gone wrong with the update, so I now renamed the “_new” files into package.json and package-lock.json, and redid the npm install. That solved the fetch problem.<br />
It just gave me a valid-url and and another problem, but I simply installed these modules again, they always seem to be gone after an update in the Ubuntu install.</p>
<p dir="auto">To be honest I do not know why the updates halts and tells me to store the (or something) the package.json and package-lock.json files, when it needs the new ones to run the update proper.<br />
To be honest I do not even know what the files do. They seem to be a record of the dependcies or something.<br />
Like I said: I am ignorant.</p>
<p dir="auto">Thanks for reading and replying to mu mail, I see that you help a lot of people. Hope this info helps you keeping up that service.</p>
<p dir="auto">Kind Regards,</p>
<p dir="auto">Hein-Jan</p>
]]></description><link>https://forum.magicmirror.builders/post/102781</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/102781</guid><dc:creator><![CDATA[Hein-Jan]]></dc:creator><pubDate>Mon, 11 Jul 2022 05:50:49 GMT</pubDate></item><item><title><![CDATA[Reply to Fetch is not a function on Sun, 03 Jul 2022 17:37:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hein-jan" aria-label="Profile: Hein-Jan">@<bdi>Hein-Jan</bdi></a> what did u do to fix this?</p>
]]></description><link>https://forum.magicmirror.builders/post/102627</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/102627</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sun, 03 Jul 2022 17:37:58 GMT</pubDate></item></channel></rss>