From: Chocobozzz Date: Fri, 24 Dec 2021 12:43:59 +0000 (+0100) Subject: Node 10 is not supported anymore X-Git-Tag: v4.1.0-rc.1~253 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=5a637488778055906dbacdca735565b2f46f0cf7;p=github%2FChocobozzz%2FPeerTube.git Node 10 is not supported anymore --- diff --git a/server.ts b/server.ts index f04e993f6..f4f448e6b 100644 --- a/server.ts +++ b/server.ts @@ -41,7 +41,12 @@ checkFFmpeg(CONFIG) process.exit(-1) }) -checkNodeVersion() +try { + checkNodeVersion() +} catch (err) { + logger.error('Error in NodeJS check.', { err }) + process.exit(-1) +} import { checkConfig, checkActivityPubUrls, checkFFmpegVersion } from './server/initializers/checker-after-init' 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 () { logger.debug('Checking NodeJS version %s.', v) if (major <= 10) { - logger.warn('Your NodeJS version %s is deprecated. Please upgrade.', v) + throw new Error('Your NodeJS version ' + v + ' is not supported. Please upgrade.') } }