mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
refactor: show code/stack when dep check fails
This commit is contained in:
@@ -42,7 +42,7 @@ try {
|
|||||||
checkVersion('lru-cache');
|
checkVersion('lru-cache');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (['ENOENT', 'DEP_WRONG_VERSION', 'MODULE_NOT_FOUND'].includes(e.code)) {
|
if (['ENOENT', 'DEP_WRONG_VERSION', 'MODULE_NOT_FOUND'].includes(e.code)) {
|
||||||
console.warn('Dependencies outdated or not yet installed.');
|
console.warn(`Dependencies outdated or not yet installed. Error Code: ${e.code}\n${e.stack}`);
|
||||||
console.log('Installing them now...\n');
|
console.log('Installing them now...\n');
|
||||||
|
|
||||||
packageInstall.updatePackageFile();
|
packageInstall.updatePackageFile();
|
||||||
|
|||||||
Reference in New Issue
Block a user