Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Node 14 #11747

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
cache: 'npm'
- name: Install npm@8
run: npm i -g npm@8
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ jobs:
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
node: ['14', '16']
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
node-version: '16'
cache: 'npm'
- name: Install npm@8
run: npm i -g npm@8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
cache: 'npm'
- name: Install npm@8
run: npm i -g npm@8
Expand Down
1 change: 0 additions & 1 deletion azure-pipelines-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ parameters:
name: ''
testScript: ''
configurations:
LinuxNode14: { vmImage: 'ubuntu-latest', nodeVersion: 14.x }
LinuxNode16: { vmImage: 'ubuntu-latest', nodeVersion: 16.x }

jobs:
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: 8.x
displayName: 'Install Node.js 8.x'
versionSpec: 10.x
displayName: 'Install Node.js 10.x'
- bash: tasks/e2e-old-node.sh
displayName: 'Run tests'
2 changes: 1 addition & 1 deletion packages/cra-template-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"license": "MIT",
"engines": {
"node": ">=14"
"node": ">=16.0.0"
},
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
2 changes: 1 addition & 1 deletion packages/cra-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"license": "MIT",
"engines": {
"node": ">=14"
"node": ">=16.0.0"
},
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
6 changes: 3 additions & 3 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,14 @@ function createApp(name, verbose, version, template, useYarn, usePnp) {
const unsupportedNodeVersion = !semver.satisfies(
// Coerce strings with metadata (i.e. `15.0.0-nightly`).
semver.coerce(process.version),
'>=14'
'>=16'
);

if (unsupportedNodeVersion) {
console.log(
chalk.yellow(
`You are using Node ${process.version} so the project will be bootstrapped with an old unsupported version of tools.\n\n` +
`Please update to Node 14 or higher for a better, fully supported experience.\n`
`Please update to Node 16 or higher for a better, fully supported experience.\n`
)
);
// Fall back to latest supported react-scripts on Node 4
Expand Down Expand Up @@ -504,7 +504,7 @@ function run(
console.log(
chalk.yellow(
`\nNote: the project was bootstrapped with an old unsupported version of tools.\n` +
`Please update to Node >=14 and npm >=6 to get supported tools in new projects.\n`
`Please update to Node >=16 and npm >=7 to get supported tools in new projects.\n`
)
);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/create-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ const currentNodeVersion = process.versions.node;
const semver = currentNodeVersion.split('.');
const major = semver[0];

if (major < 14) {
if (major < 6) {

Choose a reason for hiding this comment

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

Suggested change
if (major < 6) {
if (major < 16) {

console.error(
'You are running Node ' +
currentNodeVersion +
'.\n' +
'Create React App requires Node 14 or higher. \n' +
'Create React App requires Node 16 or higher. \n' +
'Please update your version of Node.'
);
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion packages/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"license": "MIT",
"engines": {
"node": ">=14"
"node": ">=16.0.0"
},
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-config-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"index.js",
"jest.js"
],
"engines": {
"node": ">=16.0.0"
},
"peerDependencies": {
"eslint": "^8.0.0"
},
Expand All @@ -34,8 +37,5 @@
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-testing-library": "^5.0.1"
},
"engines": {
"node": ">=14.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/react-app-polyfill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://github.com/facebook/create-react-app/issues"
},
"engines": {
"node": ">=14"
"node": ">=16.0.0"
},
"files": [
"ie9.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://github.com/facebook/create-react-app/issues"
},
"engines": {
"node": ">=14"
"node": ">=16.0.0"
},
"files": [
"browsersHelper.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"license": "MIT",
"engines": {
"node": ">=14.0.0"
"node": ">=16.0.0"
},
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down