Error : cannot find module "rrule"



  • Hello,

    I have a big problem with the calendar default module.
    Since the last magic mirror update, the module blocks the launch of the mirror.

    > magicmirror@2.9.0 start /home/pi/MagicMirror
    > sh run-start.sh
    
    Starting MagicMirror: v2.9.0
    Loading config ...
    Loading module helpers ...
    No helper found for module: alert.
    No helper found for module: clock.
    WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'rrule'
    Loading module helpers ...
    No helper found for module: alert.
    No helper found for module: clock.
    App threw an error during load
    Error: Cannot find module 'rrule'
        at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
        at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
        at Function.Module._load (internal/modules/cjs/loader.js:528:25)
        at Module.require (internal/modules/cjs/loader.js:658:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at Object. (/home/pi/MagicMirror/modules/default/calendar/vendor/ical.js/node-ical.js:27:13)
        at Object. (/home/pi/MagicMirror/modules/default/calendar/vendor/ical.js/node-ical.js:68:3)
        at Module._compile (internal/modules/cjs/loader.js:711:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
        at Module.load (internal/modules/cjs/loader.js:620:32)
    Whoops! There was an uncaught exception...
    { Error: Cannot find module 'rrule'
        at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
        at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
        at Function.Module._load (internal/modules/cjs/loader.js:528:25)
        at Module.require (internal/modules/cjs/loader.js:658:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at Object. (/home/pi/MagicMirror/modules/default/calendar/vendor/ical.js/node-ical.js:27:13)
        at Object. (/home/pi/MagicMirror/modules/default/calendar/vendor/ical.js/node-ical.js:68:3)
        at Module._compile (internal/modules/cjs/loader.js:711:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
        at Module.load (internal/modules/cjs/loader.js:620:32) code: 'MODULE_NOT_FOUND' }
    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
    Launching application.
    

    I don’t understand what is wrong.
    I removed the module and I reinstall it but the problem still there.

    Thanks for your help ! 🙂



  • @JohnB7777 said in Error : cannot find module “rrule”:

    I removed the module

    removed what module?

    do this

    cd ~MagicMirror
    npm install rrule@2.6.2
    


  • @sdetweil I removed the calendar module, the one you help me to reinstall 🙂

    And this command didn’t work, but I have the same errors when I do “npm install” on the MagicMirror folder :

    pi@raspberrypi:~/MagicMirror $ npm install rrule@2.6.2
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/aproba
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/are-we-there-yet/node_modules/isarray
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/are-we-there-yet/node_modules/process-nextick-args
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/are-we-there-yet/node_modules/string_decoder
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/are-we-there-yet/node_modules/readable-stream
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/chownr
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/cli-spinners
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/cliui/node_modules/ansi-regex
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/cliui/node_modules/ansi-styles
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/cliui/node_modules/is-fullwidth-code-point
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/cliui/node_modules/strip-ansi
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/clone
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/console-control-strings
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/defaults
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/delegates
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/are-we-there-yet
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/detect-libc
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/electron-rebuild/node_modules/colors
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/electron-rebuild/node_modules/jsonfile
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/electron-rebuild/node_modules/fs-extra
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/electron-rebuild/node_modules/ms
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/electron-rebuild/node_modules/debug
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/emoji-regex
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/cliui/node_modules/string-width
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/cliui/node_modules/wrap-ansi
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/cliui
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/has-unicode
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/mem/node_modules/mimic-fn
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/minipass/node_modules/safe-buffer
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/node-abi
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/node-gyp/node_modules/semver
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/ora/node_modules/ansi-regex
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/ora/node_modules/ansi-styles
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/ora/node_modules/has-flag
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/ora/node_modules/strip-ansi
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/ora/node_modules/supports-color
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/ora/node_modules/chalk
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/ora/node_modules/log-symbols
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/os-homedir
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/os-locale/node_modules/invert-kv
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/os-locale/node_modules/lcid
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/osenv
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/p-defer
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/map-age-cleaner
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/p-finally
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/p-is-promise
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/mem
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/p-try
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/npm-run-path
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/pump
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/get-stream
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/spawn-rx
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/strip-eof
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/tar/node_modules/safe-buffer
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/wcwidth
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/ora
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/execa
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/os-locale
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/which-module
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/wide-align
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/gauge
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/npmlog
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yallist
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/minipass
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/fs-minipass
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/minizlib
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/tar
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/node-gyp
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs-parser/node_modules/camelcase
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs-parser
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/ansi-regex
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/get-caller-file
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/is-fullwidth-code-point
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/p-limit
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/p-locate
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/path-exists
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/locate-path
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/find-up
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/require-main-filename
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/strip-ansi
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/string-width
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules/y18n
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/electron-rebuild
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/are-we-there-yet/node_modules
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/cliui/node_modules
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/electron-rebuild/node_modules
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/mem/node_modules
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/minipass/node_modules
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/node-gyp/node_modules
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/ora/node_modules
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/os-locale/node_modules
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/tar/node_modules
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs-parser/node_modules
    npm WARN checkPermissions Missing write access to /home/pi/MagicMirror/node_modules/yargs/node_modules
    npm WARN grunt-yamllint@0.3.0 requires a peer of grunt@>=1.0.1 but none is installed. You must install peer dependencies yourself.
    
    npm ERR! path /home/pi/MagicMirror/node_modules/aproba
    npm ERR! code EACCES
    npm ERR! errno -13
    npm ERR! syscall access
    npm ERR! Error: EACCES: permission denied, access '/home/pi/MagicMirror/node_modules/aproba'
    npm ERR!  { [Error: EACCES: permission denied, access '/home/pi/MagicMirror/node_modules/aproba']
    npm ERR!   stack:
    npm ERR!    'Error: EACCES: permission denied, access \'/home/pi/MagicMirror/node_modules/aproba\'',
    npm ERR!   errno: -13,
    npm ERR!   code: 'EACCES',
    npm ERR!   syscall: 'access',
    npm ERR!   path: '/home/pi/MagicMirror/node_modules/aproba' }
    npm ERR!
    npm ERR! The operation was rejected by your operating system.
    npm ERR! It is likely you do not have the permissions to access this file as the current user
    npm ERR!
    npm ERR! If you believe this might be a permissions issue, please double-check the
    npm ERR! permissions of the file and its containing directories, or try running
    npm ERR! the command again as root/Administrator (though this is not recommended).
    
    npm ERR! A complete log of this run can be found in:
    npm
    ``` ERR!     /home/pi/.npm/_logs/2019-10-08T13_03_57_910Z-debug.log


  • @JohnB7777 yeh, you used sudo somehwere… NEVER use sudo (except when told, for specific things)

    do this

    cd ~
    sudo chown -R pi MagicMirror
    

    then redo the command above.

    why would you delete a module?



  • @sdetweil I deleted this module because I though it was the cause of the error.

    I tried what you said and it worked but when I start the mirror, there is another error :

    > magicmirror@2.9.0 start /home/pi/MagicMirror
    > sh run-start.sh
    
    Starting MagicMirror: v2.9.0
    Loading config ...
    Loading module helpers ...
    No helper found for module: alert.
    No helper found for module: clock.
    Initializing new module helper ...
    Module helper loaded: calendar
    No helper found for module: currentweather.
    No helper found for module: weatherforecast.
    No helper found for module: MMM-AirQuality.
    WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'async'
    Loading module helpers ...
    No helper found for module: alert.
    No helper found for module: clock.
    Initializing new module helper ...
    Module helper loaded: calendar
    No helper found for module: currentweather.
    No helper found for module: weatherforecast.
    No helper found for module: MMM-AirQuality.
    App threw an error during load
    Error: Cannot find module 'async'
        at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
        at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
        at Function.Module._load (internal/modules/cjs/loader.js:528:25)
        at Module.require (internal/modules/cjs/loader.js:658:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at Object. (/home/pi/MagicMirror/modules/MMM-Tools/node_helper.js:9:13)
        at Object. (/home/pi/MagicMirror/modules/MMM-Tools/node_helper.js:239:3)
        at Module._compile (internal/modules/cjs/loader.js:711:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
        at Module.load (internal/modules/cjs/loader.js:620:32)
    Whoops! There was an uncaught exception...
    { Error: Cannot find module 'async'
        at Module._resolveFilename (internal/modules/cjs/loader.js:602:15)
        at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
        at Function.Module._load (internal/modules/cjs/loader.js:528:25)
        at Module.require (internal/modules/cjs/loader.js:658:17)
        at require (internal/modules/cjs/helpers.js:20:18)
        at Object. (/home/pi/MagicMirror/modules/MMM-Tools/node_helper.js:9:13)
        at Object. (/home/pi/MagicMirror/modules/MMM-Tools/node_helper.js:239:3)
        at Module._compile (internal/modules/cjs/loader.js:711:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
        at Module.load (internal/modules/cjs/loader.js:620:32) code: 'MODULE_NOT_FOUND' }
    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
    Launching application.
    ^Z
    [2]+  Stoppé                 npm start
    


  • @JohnB7777 said in Error : cannot find module “rrule”:

    MMM-Tools

    do this

    cd MagicMirror
    npm install async
    

    then restart mirror



  • @sdetweil Ok, it works but I have another error that doesn’t prevent the start of the mirror.

    Whoops! There was an uncaught exception...
    { Error: listen EADDRINUSE 127.0.0.1:8080
        at Server.setupListenHandle [as _listen2] (net.js:1330:14)
        at listenInCluster (net.js:1378:12)
        at GetAddrInfoReqWrap.doListen [as callback] (net.js:1492:7)
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:55:10)
      errno: 'EADDRINUSE',
      code: 'EADDRINUSE',
      syscall: 'listen',
      address: '127.0.0.1',
      port: 8080 }
    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
    Launching application.
    


  • @JohnB7777

    MagicMirror will not quit,
    

    already have MagicMirror running

    pm2 stop 0
    pm2 start 0
    


  • @sdetweil Yes, I use pm2 to start and stop the mirror but I use npm start to see the errors.



  • @JohnB7777

    you have two instances running…

    npm start is what pm2 does for you under the covers