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 abhiisheek committed May 24, 2023
1 parent 09bf3d9 commit 03a64f8
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 03a64f8

Please sign in to comment.