Skip to content

Commit

Permalink
add try / catch on mode_helper loading
Browse files Browse the repository at this point in the history
  • Loading branch information
bugsounet committed Oct 5, 2024
1 parent f51fbe3 commit d49c7b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ _This release is scheduled to be released on 2025-01-01._
### Fixed

- [updatenotification] Fix pm2 using detection when pm2 script is in MagicMirror root folder (#3576)
- [core] Fix loading node_helper of modules: avoid black screen, display errors and continue loading with next module (#xxxx)

## [2.29.0] - 2024-10-01

Expand Down
8 changes: 7 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,13 @@ function App () {

// if the helper was found
if (loadHelper) {
const Module = require(helperPath);
let Module;
try {
Module = require(helperPath);
} catch (e) {
Log.error(`Error when loading ${moduleName}:`, e.message);
return;
}
let m = new Module();

if (m.requiresVersion) {
Expand Down

0 comments on commit d49c7b7

Please sign in to comment.