Skip to content

Commit

Permalink
Coerce Node versions with metadata (#11057)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmckeb authored Jun 8, 2021
1 parent 382ba21 commit 0ee4765
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

2 comments on commit 0ee4765

@jen801
Copy link

@jen801 jen801 commented on 0ee4765 Jun 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #

@jen801
Copy link

@jen801 jen801 commented on 0ee4765 Jun 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙂

Please sign in to comment.