<?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[Error: ENOENT: no such file or directory, open &#x27;package.json&#x27;]]></title><description><![CDATA[<p dir="auto">I have  installed MM for the first time (Raspberry Pi 3 Model B) and everything seemed to be working fine, just playing around with stopping and starting with PM2, all was good. But I tried rebooting the pi to check the autoboot and MM does not work at all any more. It goes briefly to the MM loading screen before crashing and going to the normal pi screen. When I try to boot through terminal the MM loading screen does not show and nothing comes up. The error log gives this message:</p>
<pre><code>Error: ENOENT: no such file or directory, open 'package.json'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object. (/home/pi/MagicMirror/js/app.js:15:32)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
</code></pre>
<p dir="auto">I am pretty new to all this and it is the first time I have used JS.</p>
<p dir="auto">Thanks,<br />
Ben</p>
]]></description><link>https://forum.magicmirror.builders/topic/6193/error-enoent-no-such-file-or-directory-open-package-json</link><generator>RSS for Node</generator><lastBuildDate>Tue, 19 May 2026 06:56:51 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/6193.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Jan 2018 20:11:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Error: ENOENT: no such file or directory, open &#x27;package.json&#x27; on Sat, 02 Jun 2018 07:56:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cruunnerr" aria-label="Profile: cruunnerr">@<bdi>cruunnerr</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/mykle1" aria-label="Profile: Mykle1">@<bdi>Mykle1</bdi></a> You both are right.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cruunnerr" aria-label="Profile: cruunnerr">@<bdi>cruunnerr</bdi></a> is executing the Shell script, which must be executed in the same directory as the script is located in, except you define the path in the <code>pm2</code> command like this <code>pm2 start /path/to/script.sh</code> (also given, the script used absolute paths, or can handle the “remote” execution)</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mykle1" aria-label="Profile: Mykle1">@<bdi>Mykle1</bdi></a> You are executing the <code>pm2</code> “deamon”, which can be executed everywhere</p>
]]></description><link>https://forum.magicmirror.builders/post/40105</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/40105</guid><dc:creator><![CDATA[idoodler]]></dc:creator><pubDate>Sat, 02 Jun 2018 07:56:59 GMT</pubDate></item><item><title><![CDATA[Reply to Error: ENOENT: no such file or directory, open &#x27;package.json&#x27; on Thu, 11 Jan 2018 21:06:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cruunnerr" aria-label="Profile: cruunnerr">@<bdi>cruunnerr</bdi></a> said in <a href="/post/33826">Error: ENOENT: no such file or directory, open ‘package.json’</a>:</p>
<blockquote>
<p dir="auto">Unfortunately the pm2 start command can NOT be used in every direction.</p>
</blockquote>
<p dir="auto">Tell that to my mirror, which executes <code>pm2 start mm</code> and <code>pm2 stop mm</code> in ANY directory.</p>
<p dir="auto"><img src="/assets/uploads/files/1515704801424-capture.png" alt="0_1515704798405_Capture.PNG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.magicmirror.builders/post/33828</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/33828</guid><dc:creator><![CDATA[Mykle1]]></dc:creator><pubDate>Thu, 11 Jan 2018 21:06:57 GMT</pubDate></item><item><title><![CDATA[Reply to Error: ENOENT: no such file or directory, open &#x27;package.json&#x27; on Thu, 11 Jan 2018 20:58:53 GMT]]></title><description><![CDATA[<p dir="auto">Unfortunately the pm2 start command can NOT be used in every direction. It must be used in the same direction where the “<a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a>” is. So if u create the <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a> in your home directory u must also use “pm2 start <a href="http://mm.sh" target="_blank" rel="noopener noreferrer nofollow ugc">mm.sh</a>” in your home directory.<br />
(Just to know) :P</p>
]]></description><link>https://forum.magicmirror.builders/post/33826</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/33826</guid><dc:creator><![CDATA[cruunnerr]]></dc:creator><pubDate>Thu, 11 Jan 2018 20:58:53 GMT</pubDate></item><item><title><![CDATA[Reply to Error: ENOENT: no such file or directory, open &#x27;package.json&#x27; on Thu, 11 Jan 2018 20:54:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/benlism" aria-label="Profile: Benlism">@<bdi>Benlism</bdi></a></p>
<p dir="auto">Seeing that the last thing you were doing was <em>“just playing around with stopping and starting with PM2, all was good. But I tried rebooting the pi to check the autoboot”</em> let’s assume that PM2 is the problem. There are 2 common missed steps when installing PM2.</p>
<ol>
<li>
<p dir="auto">is when the terminal actually gives you a command that you have to execute immediately after it is presented by the terminal.</p>
</li>
<li>
<p dir="auto">The other is not saving the state of PM2, in which case, it would not function properly, if at all.</p>
</li>
</ol>
<p dir="auto">I’m not saying this is what happened. I’m just trying to narrow it down a bit</p>
]]></description><link>https://forum.magicmirror.builders/post/33825</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/33825</guid><dc:creator><![CDATA[Mykle1]]></dc:creator><pubDate>Thu, 11 Jan 2018 20:54:04 GMT</pubDate></item><item><title><![CDATA[Reply to Error: ENOENT: no such file or directory, open &#x27;package.json&#x27; on Thu, 11 Jan 2018 20:41:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mykle1" aria-label="Profile: Mykle1">@<bdi>Mykle1</bdi></a> I was using pm2 start, npm from the directory seems to work fine. Am trying some forum posts like <a href="https://stackoverflow.com/questions/24468041/npm-install-gives-error-cant-find-a-package-json-file" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/24468041/npm-install-gives-error-cant-find-a-package-json-file</a> but nothing has worked yet.</p>
]]></description><link>https://forum.magicmirror.builders/post/33821</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/33821</guid><dc:creator><![CDATA[Benlism]]></dc:creator><pubDate>Thu, 11 Jan 2018 20:41:43 GMT</pubDate></item><item><title><![CDATA[Reply to Error: ENOENT: no such file or directory, open &#x27;package.json&#x27; on Thu, 11 Jan 2018 20:30:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/benlism" aria-label="Profile: Benlism">@<bdi>Benlism</bdi></a></p>
<p dir="auto">An ENOENT error usually indicates that a command was issued in the wrong directory. This would occur if you were trying to run <code>npm start</code> in a directory other than <code>pi@raspberry:~/MagicMirror$ </code></p>
<p dir="auto">Edit: The <code>pm2 start mm</code> command can be run from any directory (I think) although this would not account for your mirror crashing as your described</p>
]]></description><link>https://forum.magicmirror.builders/post/33820</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/33820</guid><dc:creator><![CDATA[Mykle1]]></dc:creator><pubDate>Thu, 11 Jan 2018 20:30:07 GMT</pubDate></item></channel></rss>