mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
added error message if <modulename>.js
file is missing … (#3015)
… in module folder to get a hint in the logs fixes #2403
This commit is contained in:
parent
67e4dbaacd
commit
157e74ce7c
@ -15,6 +15,7 @@ _This release is scheduled to be released on 2023-04-01._
|
|||||||
- Added tests for hourly weather forecast
|
- Added tests for hourly weather forecast
|
||||||
- Added possibility to ignore MagicMirror repo in updatenotification module
|
- Added possibility to ignore MagicMirror repo in updatenotification module
|
||||||
- Added Pirate Weather as new weather provider (#3005)
|
- Added Pirate Weather as new weather provider (#3005)
|
||||||
|
- Added error message if `<modulename>.js` file is missing in module folder to get a hint in the logs (#2403)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -113,6 +113,14 @@ function App() {
|
|||||||
moduleFolder = `${__dirname}/../modules/default/${module}`;
|
moduleFolder = `${__dirname}/../modules/default/${module}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const moduleFile = `${moduleFolder}/${module}.js`;
|
||||||
|
|
||||||
|
try {
|
||||||
|
fs.accessSync(moduleFile, fs.R_OK);
|
||||||
|
} catch (e) {
|
||||||
|
Log.warn(`No ${moduleFile} found for module: ${moduleName}.`);
|
||||||
|
}
|
||||||
|
|
||||||
const helperPath = `${moduleFolder}/node_helper.js`;
|
const helperPath = `${moduleFolder}/node_helper.js`;
|
||||||
|
|
||||||
let loadHelper = true;
|
let loadHelper = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user