We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46732f2 commit b2a2253Copy full SHA for b2a2253
packages/react-scripts/bin/react-scripts.js
@@ -8,6 +8,20 @@
8
9
'use strict';
10
11
+// Check Node.js version early for clearer errors (see #5430)
12
+const currentNodeVersion = process.versions.node;
13
+const [major] = currentNodeVersion.split('.');
14
+if (Number(major) < 14) {
15
+ console.error(
16
+ 'You are running Node ' +
17
+ currentNodeVersion +
18
+ '.\n' +
19
+ 'react-scripts requires Node 14 or higher. \n' +
20
+ 'Please update your version of Node.'
21
+ );
22
+ process.exit(1);
23
+}
24
+
25
// Makes the script crash on unhandled rejections instead of silently
26
// ignoring them. In the future, promise rejections that are not handled will
27
// terminate the Node.js process with a non-zero exit code.
0 commit comments