This commit is contained in:
Isaac 2022-10-05 00:35:54 +01:00
parent e723ce76f5
commit c2fe7f73d1
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -21,6 +21,9 @@
* @license GNU-GPLv3
*/
process.env.NODE_ENV ??= 'development'; // make sure NODE_ENV is set
require('dotenv').config(); // load env file
const pkg = require('../package.json');
const fs = require('fs');
const semver = require('semver');
@ -31,9 +34,6 @@ const YAML = require('yaml');
const Client = require('./client');
const http = require('./http');
process.env.NODE_ENV ??= 'development'; // make sure NODE_ENV is set
require('dotenv').config(); // load env file
// check node version
if (!semver.satisfies(process.versions.node, pkg.engines.node)) {
console.log('\x07' + colours.redBright(`Error: Your current Node.js version, ${process.versions.node}, does not meet the requirement "${pkg.engines.node}".`));