diff options
-rw-r--r-- | server.ts | 7 | ||||
-rw-r--r-- | server/initializers/checker-before-init.ts | 2 |
2 files changed, 7 insertions, 2 deletions
@@ -41,7 +41,12 @@ checkFFmpeg(CONFIG) | |||
41 | process.exit(-1) | 41 | process.exit(-1) |
42 | }) | 42 | }) |
43 | 43 | ||
44 | checkNodeVersion() | 44 | try { |
45 | checkNodeVersion() | ||
46 | } catch (err) { | ||
47 | logger.error('Error in NodeJS check.', { err }) | ||
48 | process.exit(-1) | ||
49 | } | ||
45 | 50 | ||
46 | import { checkConfig, checkActivityPubUrls, checkFFmpegVersion } from './server/initializers/checker-after-init' | 51 | import { checkConfig, checkActivityPubUrls, checkFFmpegVersion } from './server/initializers/checker-after-init' |
47 | 52 | ||
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 2c24e20c8..d2f3bb128 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts | |||
@@ -117,7 +117,7 @@ function checkNodeVersion () { | |||
117 | logger.debug('Checking NodeJS version %s.', v) | 117 | logger.debug('Checking NodeJS version %s.', v) |
118 | 118 | ||
119 | if (major <= 10) { | 119 | if (major <= 10) { |
120 | logger.warn('Your NodeJS version %s is deprecated. Please upgrade.', v) | 120 | throw new Error('Your NodeJS version ' + v + ' is not supported. Please upgrade.') |
121 | } | 121 | } |
122 | } | 122 | } |
123 | 123 | ||