build(gulp): fail hard w/ legacy node version and provide clear upgrade instructions
Closes #6213
This commit is contained in:
parent
89bd008445
commit
fb6335ab60
|
@ -17,8 +17,8 @@ var semver;
|
||||||
var issues = [];
|
var issues = [];
|
||||||
|
|
||||||
// coarse Node version check
|
// coarse Node version check
|
||||||
if (process.version[1] !== '4') {
|
if (Number.parseInt(process.version[1], 10) < 5) {
|
||||||
issues.push("Angular 2 build currently requires Node 4. Use nvm to update your node version.");
|
issues.push("Angular 2 build currently requires Node 5. Use nvm to update your node version.");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -27,6 +27,14 @@ try {
|
||||||
issues.push("Looks like you are missing some npm dependencies. Run: npm install");
|
issues.push("Looks like you are missing some npm dependencies. Run: npm install");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (issues.length) {
|
||||||
|
printWarning(issues);
|
||||||
|
console.error("Your environment doesn't provide the prerequisite dependencies.\n" +
|
||||||
|
"Please fix the issues listed above and then rerun the gulp command.\n" +
|
||||||
|
"Check out https://github.com/angular/angular/blob/master/DEVELOPER.md for more info.");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
// wrap in try/catch in case someone requires from within that file
|
// wrap in try/catch in case someone requires from within that file
|
||||||
try {
|
try {
|
||||||
checkNodeModules = require('./npm/check-node-modules.js');
|
checkNodeModules = require('./npm/check-node-modules.js');
|
||||||
|
|
Loading…
Reference in New Issue