From 33b75bd095db56bddff37c11fdfe89614433c496 Mon Sep 17 00:00:00 2001 From: Jan Staněk Date: Jan 29 2026 13:18:01 +0000 Subject: Node.js: add paragraph about new BuildRequires requirements --- diff --git a/guidelines/modules/ROOT/pages/Node.js.adoc b/guidelines/modules/ROOT/pages/Node.js.adoc index 6749664..408ac42 100644 --- a/guidelines/modules/ROOT/pages/Node.js.adoc +++ b/guidelines/modules/ROOT/pages/Node.js.adoc @@ -23,6 +23,15 @@ To build a package that is a nodejs module, bundles or uses nodejs modules, or n BuildRequires: nodejs-devel .... +As an unfortunate side effect of https://fedoraproject.org/wiki/Changes/NodejsAlternativesSystem[how Node.js packages alternative versions] and how the build system treats weak dependencies, you need to explicitly ask for the `+node+` or `+npm+` command to be available if you need either of them. By default, only a versioned variant (e.g. `+node22+`) will be present. The suggested way is to ask for the path directly: + +.... +# If you do not care about which major version of Node.js you will build against +BuildRequires: nodejs-devel, /usr/bin/node, /usr/bin/npm +# If you know you need a specific major version, e.g. Node.js 24.* +BuildRequires: nodejs24-devel, /usr/bin/node, /usr/bin/npm +.... + == Macros The following macros are defined for you: