Skip to content

Commit 35cc592

Browse files
florian-lefebvreascorbicsarah11918
authored
[v6] drop node 18 (#12423)
Co-authored-by: Matt Kane <m@mk.gg> Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
1 parent f7e6625 commit 35cc592

File tree

6 files changed

+34
-6
lines changed

6 files changed

+34
-6
lines changed

src/content/docs/en/guides/deploy/microsoft-azure.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The GitHub action yaml that is created for you assumes the use of node 14. This
3838

3939
```
4040
"engines": {
41-
"node": ">=18.0.0"
41+
"node": ">=22.0.0"
4242
},
4343
```
4444

src/content/docs/en/guides/deploy/netlify.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ You can also create a new site on Netlify and link up your Git repository by ins
9999

100100
### Set a Node.js version
101101

102-
If you are using a legacy [build image](https://docs.netlify.com/configure-builds/get-started/#build-image-selection) (Xenial) on Netlify, make sure that your Node.js version is set. Astro requires `v18.20.8` or `v20.3.0` or higher.
102+
If you are using a legacy [build image](https://docs.netlify.com/configure-builds/get-started/#build-image-selection) (Xenial) on Netlify, make sure that your Node.js version is set. Astro requires `v22.0.0` or higher.
103103

104104
You can [specify your Node.js version in Netlify](https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-and-javascript) using:
105105
- a [`.nvmrc`](https://github.com/nvm-sh/nvm#nvmrc) file in your base directory.

src/content/docs/en/guides/upgrade-to/v6.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,34 @@ See [the Astro changelog](https://github.com/withastro/astro/blob/main/packages/
5959

6060
Any major upgrades to Astro's dependencies may cause breaking changes in your project.
6161

62+
### Node 22
63+
64+
<SourcePR number="14427" title="feat!: drop node 18 and 20"/>
65+
66+
Node 18 reached its End of Life in March 2025 and Node 20 is scheduled to reach its End of Life in April 2026.
67+
68+
Astro v6.0 drops Node 18 and Node 20 support entirely so that all Astro users can take advantage of Node's more modern features.
69+
70+
#### What should I do?
71+
72+
Check that both your development environment and your deployment environment are using **Node `22.0.0` or higher**.
73+
74+
<Steps>
75+
1. Check your local version of Node using:
76+
77+
```sh
78+
node -v
79+
```
80+
81+
2. Check your [deployment environment's](/en/guides/deploy/) own documentation to verify that they support Node 22.
82+
83+
You can specify Node `22.0.0` for your Astro project either in a dashboard configuration setting or a `.nvmrc` file.
84+
85+
```bash title=".nvmrc"
86+
22.0.0
87+
```
88+
</Steps>
89+
6290
## Legacy
6391

6492
The following features are now considered legacy features. They should function normally but are no longer recommended and are in maintenance mode. They will see no future improvements and documentation will not be updated. These features will eventually be deprecated, and then removed entirely.

src/content/docs/en/install-and-setup.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Prefer to try Astro in your browser? Visit [astro.new](https://astro.new/) to br
2424

2525
## Prerequisites
2626

27-
- **Node.js** - `v18.20.8` or `v20.3.0`, `v22.0.0` or higher. ( `v19` and `v21` are not supported.)
27+
- **Node.js** - `v22.0.0` or higher. Odd-numbered versions like `v23` are not supported.
2828
- **Text editor** - We recommend [VS Code](https://code.visualstudio.com/) with our [Official Astro extension](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode).
2929
- **Terminal** - Astro is accessed through its command-line interface (CLI).
3030

src/content/docs/en/tutorial/1-setup/1.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ You can access the command line through a local terminal program for your operat
2828

2929
### Node.js
3030

31-
For Astro to run on your system, you will also need to have a compatible version of [**Node.js**](https://nodejs.org/en/) installed. Astro supports **even-numbered** Node.js versions. The current minimum supported versions of each are: `v18.20.8`, `v20.3.0`, and `v22.0.0`. (`v19` and `v21` are not supported.)
31+
For Astro to run on your system, you will also need to have a compatible version of [**Node.js**](https://nodejs.org/en/) installed. Astro supports **even-numbered** Node.js versions. The current minimum supported version is `v22.0.0`. Odd-numbered versions like `v23` are not supported.
3232

3333
To check to see whether you already have a compatible version installed, run the following command in your terminal:
3434

3535
```sh
3636
node -v
3737

3838
// Example output
39-
v18.20.8
39+
v22.20.0
4040
```
4141

4242
If the command returns a version number supported by Astro, you're good to go!

src/content/docs/en/upgrade-astro.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ A major release may also include some non-breaking changes and improvements that
194194
The following rules define when Astro may deprecate, drop, or add support for versions of Node.js:
195195

196196
- Odd versions of Node.js can be deprecated and/or dropped when the next even version of Node.js published. This change can occur in a **minor** release of Astro, after a reasonable period of extended support as decided by the Astro Core team.
197-
- Upgrading the minimum **_Maintenance_ LTS** (within the same major range, e.g. from `v18.14.*` to `v18.20.*`) version of Node.js can occur in a **minor** release of Astro.
197+
- Upgrading the minimum **_Maintenance_ LTS** (within the same major range, e.g. from `22.14.*` to `22.20.*`) version of Node.js can occur in a **minor** release of Astro.
198198
- Security exception: If a security flaw in Node.js that **affects Astro** is disclosed and fixed, the Core team can bump the minimum version of the **_Maintenance_ LTS** in a **patch** release.
199199
- Upgrading minor or major versions of Node.js (**not** Maintenance LTS) occurs only in major versions of Astro.
200200
- Security exception: If a security flaw in Node.js that **affects Astro** is disclosed and fixed, the Core team can bump the minimum version in a **minor** release.

0 commit comments

Comments
 (0)