mirror of
https://github.com/directus/directus.git
synced 2026-02-16 05:35:19 -05:00
14 lines
424 B
JavaScript
14 lines
424 B
JavaScript
const chalk = require('chalk');
|
|
|
|
module.exports = function checkRequirements() {
|
|
const nodeVersion = process.versions.node;
|
|
const major = +nodeVersion.split('.')[0];
|
|
|
|
if (major < 10) {
|
|
console.error(`You are running ${chalk.red(`Node ${nodeVersion}`)}.`);
|
|
console.error(`Directus requires ${chalk.green(`Node 10`)} and up.`);
|
|
console.error('Please update your Node version and try again.');
|
|
process.exit(1);
|
|
}
|
|
}
|