mirror of
https://github.com/strapi/strapi.git
synced 2025-07-19 15:06:11 +00:00
15 lines
456 B
JavaScript
15 lines
456 B
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
module.exports = function checkBeforeInstall() {
|
||
|
var currentNodeVersion = process.versions.node;
|
||
|
var semver = currentNodeVersion.split('.');
|
||
|
var major = semver[0];
|
||
|
|
||
|
if (major < 10 || major == 11) {
|
||
|
console.error(`You are running Node ${currentNodeVersion}`);
|
||
|
console.error('Strapi requires Node 10 or Node 12 and higher.');
|
||
|
console.error('Please make sure to use the right version of Node.');
|
||
|
process.exit(1);
|
||
|
}
|
||
|
};
|