From 0a53b0a2cf3659b7d979d63c026a04159e6aaf74 Mon Sep 17 00:00:00 2001
From: Earl Warren <contact@earl-warren.org>
Date: Tue, 12 Sep 2023 13:09:48 +0200
Subject: [PATCH] developer: the minimum node version is 20

Things will fail in mysterious ways with lower version. For instance when
trying `make watch` the page won't load and complain index.js is not found.
---
 docs/developer/from-source.md | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/docs/developer/from-source.md b/docs/developer/from-source.md
index 856f8ff1..03b7932a 100644
--- a/docs/developer/from-source.md
+++ b/docs/developer/from-source.md
@@ -12,9 +12,9 @@ environment variable and to add the go bin directory or directories
 `${GOPATH//://bin:}/bin` to the `$PATH`. See the Go wiki entry for
 [GOPATH](https://github.com/golang/go/wiki/GOPATH).
 
-Next, [install Node.js with npm](https://nodejs.org/en/download/) which is
+Next, [install Node.js with npm](https://nodejs.org/en/download/current) which is
 required to build the JavaScript and CSS files. The minimum supported Node.js
-version is 16 and the latest LTS version is recommended.
+version is 20.
 
 **Note**: When executing make tasks that require external tools, like
 `make misspell-check`, Forgejo will automatically download and build these as
@@ -61,7 +61,7 @@ git checkout v1.21.2-0
 To build from source, the following programs must be present on the system:
 
 - `go` v1.20 or higher, see [here](https://golang.org/dl/)
-- `node` 16 or higher with `npm`, see [here](https://nodejs.org/en/download/)
+- `node` 20 or higher with `npm`, see [here](https://nodejs.org/en/download/current)
 - `make`
 
 Depending on requirements, the following build tags can be included.
@@ -95,7 +95,7 @@ TAGS="bindata sqlite sqlite_unlock_notify" make build
 The `build` target is split into two sub-targets:
 
 - `make backend` which requires [Go v1.20](https://golang.org/dl/) or greater.
-- `make frontend` which requires [Node.js 16](https://nodejs.org/en/download/) or greater.
+- `make frontend` which requires [Node.js 20](https://nodejs.org/en/download/current) or greater.
 
 If pre-built frontend files are present it is possible to only build the backend:
 
@@ -114,3 +114,9 @@ launched manually from command line, it can be killed by pressing `Ctrl + C`.
 ```bash
 ./forgejo web
 ```
+
+To run and continuously rebuild when the source files change:
+
+```bash
+make watch
+```