MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Problem with pm2 (package.json) after installing the first module



  • Hello,

    currently I am building a new MM and have at the beginning unusual problems.
    I installed the MM blank and take my old config.js from my old MM. After that the MM starts normally via pm2.
    As soon as I installed the first module, the MM does not start anymore via pm2.
    The pm2-Logs are

    pi@raspberrypi:~ $ pm2 logs MagicMirror
    [TAILING] Tailing last 15 lines for [MagicMirror] process (change the value with --lines option)
    /home/pi/.pm2/logs/MagicMirror-out.log last 15 lines:
    0|MagicMir | All module helpers loaded.
    0|MagicMir | Starting server on port 8080 ... 
    0|MagicMir | Server started ...
    0|MagicMir | Connecting socket for: calendar
    0|MagicMir | Starting node helper for: calendar
    0|MagicMir | Connecting socket for: newsfeed
    0|MagicMir | Starting module: newsfeed
    0|MagicMir | Sockets connected & modules started ...
    0|MagicMir | Launching application.
    0|MagicMir | Create new calendar fetcher for url: https://calendar.google.com/…/…/private-xxxxxxxxxx/basic.ics - Interval: 300000
    0|MagicMir | Create new calendar fetcher for url: https://calendar.google.com/…/…/private-xxxxxxxxxx/basic.ics - Interval: 300000
    0|MagicMir | Create new news fetcher for url: http://www.tagesschau.de/xml/rss2 - Interval: 300000
    0|MagicMir | Shutting down server...
    0|MagicMir | Stopping module helper: calendar
    0|MagicMir | Stopping module helper: newsfeed
    
    /home/pi/.pm2/logs/MagicMirror-error.log last 15 lines:
    0|MagicMir | { Error: ENOENT: no such file or directory, open 'package.json'
    0|MagicMir | at Object.fs.openSync (fs.js:660:18)
    0|MagicMir | at Object.fs.readFileSync (fs.js:565:33)
    0|MagicMir | at Object. (/home/pi/MagicMirror/js/app.js:15:32)
    0|MagicMir | at Module._compile (internal/modules/cjs/loader.js:654:30)
    0|MagicMir | at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    0|MagicMir | at Module.load (internal/modules/cjs/loader.js:566:32)
    0|MagicMir | at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    0|MagicMir | at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    0|MagicMir | at Module.require (internal/modules/cjs/loader.js:598:17)
    0|MagicMir | at require (internal/modules/cjs/helpers.js:11:18)
    0|MagicMir | errno: -2,
    0|MagicMir | code: 'ENOENT',
    0|MagicMir | syscall: 'open',
    0|MagicMir | path: 'package.json' }
    

    When the MM start via pm2 the package.json file seems to be corrupt. When I start with DISPLAY =: 0 it works.

    I would be grateful if someone could help me.

    Thanks in advance.


Log in to reply