bastilimbach / docker-MagicMirror

Docker image for the Magic Mirror 2 project by Michael Teeuw.
https://hub.docker.com/r/bastilimbach/docker-magicmirror/
MIT License
186 stars 54 forks source link

Error: Cannot find module 'valid-url' #56

Closed simphide closed 3 years ago

simphide commented 3 years ago

Hi,

with the newest docker image I get the error message that the module valid-url is missing. When I remove all URLs fromt the config.js (calenders and newsfeeds) everything works fine.

Also the previous docker image version works fine.

Does anybody have a solution?

Thank you!

[06.06.2021 21:30.43.374] [LOG]   Starting MagicMirror: v2.15.0
[06.06.2021 21:30.43.376] [LOG]   Loading config ...
[06.06.2021 21:30.43.378] [LOG]   Loading module helpers ...
[06.06.2021 21:30.43.379] [LOG]   No helper found for module: alert.
[06.06.2021 21:30.43.427] [LOG]   Initializing new module helper ...
[06.06.2021 21:30.43.428] [LOG]   Module helper loaded: updatenotification
[06.06.2021 21:30.43.428] [LOG]   No helper found for module: clock.
[06.06.2021 21:30.43.428] [LOG]   No helper found for module: calendar_monthly.
[06.06.2021 21:30.43.429] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module 'valid-url'
Require stack:
- /opt/magic_mirror/modules/default/calendar/node_helper.js
- /opt/magic_mirror/js/app.js
- /opt/magic_mirror/serveronly/index.js
[06.06.2021 21:30.43.430] [LOG]   Loading module helpers ...
[06.06.2021 21:30.43.430] [LOG]   No helper found for module: alert.
[06.06.2021 21:30.43.430] [LOG]   Initializing new module helper ...
[06.06.2021 21:30.43.430] [LOG]   Module helper loaded: updatenotification
[06.06.2021 21:30.43.430] [LOG]   No helper found for module: clock.
[06.06.2021 21:30.43.431] [LOG]   No helper found for module: calendar_monthly.
[06.06.2021 21:30.43.431] [ERROR] Whoops! There was an uncaught exception...
[06.06.2021 21:30.43.434] [ERROR] Error: Cannot find module 'valid-url'
Require stack:
- /opt/magic_mirror/modules/default/calendar/node_helper.js
- /opt/magic_mirror/js/app.js
- /opt/magic_mirror/serveronly/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._resolveFilename (/opt/magic_mirror/node_modules/module-alias/index.js:49:29)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/opt/magic_mirror/modules/default/calendar/node_helper.js:9:16)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/opt/magic_mirror/modules/default/calendar/node_helper.js',
    '/opt/magic_mirror/js/app.js',
    '/opt/magic_mirror/serveronly/index.js'
  ]
}
[06.06.2021 21:30.43.434] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[06.06.2021 21:30.43.434] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
simphide commented 3 years ago

You have to update the default modules

sejka commented 3 years ago

Having same issue, downloaded newest default modules (from master branch) and uploaded them to the pi but still no luck. Are there any npm install shenanigans that I need to do afterwards? Rolled back to default config but still no luck. Thanks!

sejka commented 3 years ago

@simphide have you done anything more than that? afair default modules don't have any dependencies so i'm clueless. Thanks

simphide commented 3 years ago

You have to update the default modules since they are mapped to the host system and not automatically updated