Skip to content

Commit

Permalink
Coerce Node versions with metadata (facebook#11057)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmckeb authored and sumanthratna committed Aug 4, 2021
1 parent 148ca9d commit 8de50b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,12 @@ function init() {
}

function createApp(name, verbose, version, template, useNpm, usePnp) {
const unsupportedNodeVersion = !semver.satisfies(process.version, '>=10');
const unsupportedNodeVersion = !semver.satisfies(
// Coerce strings with metadata (i.e. `15.0.0-nightly`).
semver.coerce(process.version),
'>=10'
);

if (unsupportedNodeVersion) {
console.log(
chalk.yellow(
Expand Down

0 comments on commit 8de50b3

Please sign in to comment.