Skip to content

Commit 0ee4765

Browse files
authored
Coerce Node versions with metadata (#11057)
1 parent 382ba21 commit 0ee4765

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/create-react-app/createReactApp.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,12 @@ function init() {
236236
}
237237

238238
function createApp(name, verbose, version, template, useNpm, usePnp) {
239-
const unsupportedNodeVersion = !semver.satisfies(process.version, '>=10');
239+
const unsupportedNodeVersion = !semver.satisfies(
240+
// Coerce strings with metadata (i.e. `15.0.0-nightly`).
241+
semver.coerce(process.version),
242+
'>=10'
243+
);
244+
240245
if (unsupportedNodeVersion) {
241246
console.log(
242247
chalk.yellow(

0 commit comments

Comments
 (0)