{"id":164324,"date":"2026-03-24T20:20:31","date_gmt":"2026-03-24T17:20:31","guid":{"rendered":"https:\/\/computingforgeeks.com\/nodejs-24-rocky-almalinux\/"},"modified":"2026-03-25T02:55:43","modified_gmt":"2026-03-24T23:55:43","slug":"nodejs-24-rocky-almalinux","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/nodejs-24-rocky-almalinux\/","title":{"rendered":"Install Node.js 24 LTS on Rocky Linux 10 \/ AlmaLinux 10"},"content":{"rendered":"\n<p>Rocky Linux 10 bundles Node.js 22 in AppStream, which covers most use cases. But if you need npm 11&#8217;s faster dependency resolution, V8 13.6 for Float16Array support, or the promoted permission model, Node.js 24 Krypton is the current Active LTS and the right move.<\/p>\n\n\n\n<p>This guide walks through three ways to install Node.js 24 on Rocky Linux 10, AlmaLinux 10, and RHEL 10, with real command output from a test VM. After installation, we build a working Express.js API, run the built-in test runner, configure a <a href=\"https:\/\/computingforgeeks.com\/systemctl-commands-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">systemd service<\/a> for production, and cover SELinux and firewalld configuration. If you run Ubuntu or Debian, see the <a href=\"https:\/\/computingforgeeks.com\/nodejs-24-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ubuntu 24.04\/22.04 guide<\/a> or the <a href=\"https:\/\/computingforgeeks.com\/nodejs-24-debian\/\" target=\"_blank\" rel=\"noreferrer noopener\">Debian 13\/12 guide<\/a> instead.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What You Need<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Rocky Linux 10, AlmaLinux 10, or RHEL 10 with sudo access<\/li>\n\n<li>About 80 MB disk space for Node.js and npm<\/li>\n\n<li>Port 3000\/tcp open in firewalld if running web applications<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Check Your Current Node.js Version<\/h2>\n\n\n\n<p>Before installing, check whether Node.js is already on the system:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node -v 2>\/dev\/null || echo \"Node.js not installed\"\nnpm -v 2>\/dev\/null || echo \"npm not installed\"<\/code><\/pre>\n\n\n\n<p>Rocky Linux 10 ships Node.js 22 in the AppStream repository as a module stream. That version works fine for many projects, but it does not include Node.js 24. The methods below get you the latest LTS release.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install Node.js 24 on Rocky Linux 10<\/h2>\n\n\n\n<p>Three methods are available. Pick one based on your use case: NodeSource for production servers with automatic dnf updates, NVM for development machines that need <a href=\"https:\/\/computingforgeeks.com\/manage-nodejs-versions-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">multiple Node.js versions<\/a>, or the binary tarball for air-gapped or custom setups.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Method 1: NodeSource Repository (Recommended for Production)<\/h3>\n\n\n\n<p>NodeSource tracks upstream Node.js releases and packages them as RPMs that integrate with dnf. Updates arrive within hours of each Node.js release.<\/p>\n\n\n\n<p>If the AppStream <code>nodejs<\/code> module is enabled, disable it first so it does not conflict with NodeSource:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf module disable -y nodejs<\/code><\/pre>\n\n\n\n<p>Add the NodeSource repository for Node.js 24:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/rpm.nodesource.com\/setup_24.x | sudo bash -<\/code><\/pre>\n\n\n\n<p>Install Node.js (npm and npx are bundled):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y nodejs<\/code><\/pre>\n\n\n\n<p>Verify the installation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node -v\nnpm -v<\/code><\/pre>\n\n\n\n<p>Confirmed output from a Rocky Linux 10 VM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>v24.14.0\n11.9.0<\/code><\/pre>\n\n\n\n<p>Check the V8 engine version and platform:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node -e \"console.log('Platform:', process.platform, process.arch); console.log('V8:', process.versions.v8)\"<\/code><\/pre>\n\n\n\n<p>V8 13.6 confirmed on the test VM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Platform: linux x64\nV8: 13.6.233.17-node.41<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Method 2: NVM (Best for Development)<\/h3>\n\n\n\n<p>NVM installs Node.js in your home directory and lets you <a href=\"https:\/\/computingforgeeks.com\/manage-nodejs-versions-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">switch between multiple Node.js versions<\/a> per project. No sudo required for npm global installs.<\/p>\n\n\n\n<p>Install NVM (auto-detects the latest release from GitHub):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NVM_VER=$(curl -s https:\/\/api.github.com\/repos\/nvm-sh\/nvm\/releases\/latest | grep tag_name | cut -d \\\" -f4)\ncurl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/${NVM_VER}\/install.sh | bash<\/code><\/pre>\n\n\n\n<p>Reload your shell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source ~\/.bashrc<\/code><\/pre>\n\n\n\n<p>Install Node.js 24 and set it as the default:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nvm install 24\nnvm alias default 24\nnode -v<\/code><\/pre>\n\n\n\n<p>Switch between versions any time with <code>nvm use 22<\/code> or <code>nvm use 24<\/code>. For production servers, NodeSource is still the better choice because NVM does not provide automatic security updates through dnf.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Method 3: Official Binary Tarball<\/h3>\n\n\n\n<p>Download the prebuilt binary directly from nodejs.org. This works on any Linux system regardless of package manager. The version auto-detects from the Node.js download API:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NODE_VER=$(curl -s https:\/\/nodejs.org\/dist\/latest-v24.x\/ | grep -oP 'node-v\\K[0-9.]+' | head -1)\ncurl -sLO https:\/\/nodejs.org\/dist\/v${NODE_VER}\/node-v${NODE_VER}-linux-x64.tar.xz\nsudo tar xJf node-v${NODE_VER}-linux-x64.tar.xz -C \/usr\/local --strip-components=1\nrm node-v${NODE_VER}-linux-x64.tar.xz<\/code><\/pre>\n\n\n\n<p>Verify:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node -v\nnpm -v<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install Build Tools for Native Modules<\/h2>\n\n\n\n<p>Packages like <code>bcrypt<\/code>, <code>sharp<\/code>, and <code>sqlite3<\/code> compile native C\/C++ addons during <code>npm install<\/code>. Without the build toolchain, they fail with <code>gyp ERR!<\/code> errors:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y gcc-c++ make<\/code><\/pre>\n\n\n\n<p>NVM users get this handled automatically when Node.js compiles from source, but NodeSource and tarball installs need it explicitly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SELinux Configuration<\/h2>\n\n\n\n<p>Rocky Linux 10 runs SELinux in enforcing mode. Node.js works with the default policy when running on standard ports. No custom booleans or context changes are needed for a typical Node.js application.<\/p>\n\n\n\n<p>Verify there are no SELinux denials after starting your Node.js application:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ausearch -m avc -ts recent<\/code><\/pre>\n\n\n\n<p>If the output shows no matches, SELinux is not blocking anything. If you bind Node.js to a non-standard port (anything other than common HTTP ports), you may need to allow it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo semanage port -a -t http_port_t -p tcp 3000<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configure Firewalld<\/h2>\n\n\n\n<p>Rocky Linux 10 uses firewalld by default. Open port 3000 for your Node.js application:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --permanent --add-port=3000\/tcp\nsudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>Verify the port is open:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --list-ports<\/code><\/pre>\n\n\n\n<p>You should see <code>3000\/tcp<\/code> in the output. For production deployments behind Nginx or Apache, open port 443\/tcp instead and proxy traffic to the Node.js backend.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Build an Express.js API (Demo Project)<\/h2>\n\n\n\n<p>A quick demo confirms the full stack works. Initialize a project and install Express:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p ~\/node-demo && cd ~\/node-demo\nnpm init -y\nnpm install express<\/code><\/pre>\n\n\n\n<p>Create the server file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi ~\/node-demo\/server.js<\/code><\/pre>\n\n\n\n<p>Add the following Express application:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const express = require(\"express\");\nconst app = express();\nconst PORT = 3000;\n\napp.get(\"\/\", (req, res) => {\n  res.json({\n    message: \"Node.js 24 LTS running on Rocky Linux 10\",\n    nodeVersion: process.version,\n    v8Version: process.versions.v8,\n    platform: process.platform,\n    arch: process.arch,\n    uptime: process.uptime()\n  });\n});\n\napp.listen(PORT, () => console.log(\"Server running on port \" + PORT));<\/code><\/pre>\n\n\n\n<p>Start the server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node ~\/node-demo\/server.js<\/code><\/pre>\n\n\n\n<p>From another terminal, hit the API:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl http:\/\/localhost:3000\/<\/code><\/pre>\n\n\n\n<p>Real JSON response from our Rocky Linux 10 test VM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"message\": \"Node.js 24 LTS running on Rocky Linux 10\",\n    \"nodeVersion\": \"v24.14.0\",\n    \"v8Version\": \"13.6.233.17-node.41\",\n    \"platform\": \"linux\",\n    \"arch\": \"x64\",\n    \"uptime\": 2.008696158\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Use the Built-in Test Runner<\/h2>\n\n\n\n<p>Node.js 24 ships a production-ready test runner in the <code>node:test<\/code> module. For projects that don&#8217;t need Jest&#8217;s mocking framework or Mocha&#8217;s plugin ecosystem, it covers the basics without any npm dependencies.<\/p>\n\n\n\n<p>Create a test file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi ~\/node-demo\/test.mjs<\/code><\/pre>\n\n\n\n<p>Add the following test cases:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import { test } from \"node:test\";\nimport assert from \"node:assert\";\n\ntest(\"math works\", () => {\n  assert.strictEqual(1 + 1, 2);\n});\n\ntest(\"node version is 24\", () => {\n  assert.ok(process.version.startsWith(\"v24\"));\n});<\/code><\/pre>\n\n\n\n<p>Run the tests:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node --test ~\/node-demo\/test.mjs<\/code><\/pre>\n\n\n\n<p>Real output from our Rocky Linux 10 VM:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2714 math works (0.481963ms)\n\u2714 node version is 24 (0.126785ms)\n\u2139 tests 2\n\u2139 suites 0\n\u2139 pass 2\n\u2139 fail 0\n\u2139 cancelled 0\n\u2139 skipped 0\n\u2139 todo 0\n\u2139 duration_ms 39.468755<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Run Node.js as a systemd Service<\/h2>\n\n\n\n<p>For production deployments, configure <a href=\"https:\/\/computingforgeeks.com\/systemctl-commands-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">systemd<\/a> to start your Node.js app on boot and restart it on crashes.<\/p>\n\n\n\n<p>Create a dedicated user for the application:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo useradd -r -s \/sbin\/nologin nodeapp<\/code><\/pre>\n\n\n\n<p>Create the service unit file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vi \/etc\/systemd\/system\/nodeapp.service<\/code><\/pre>\n\n\n\n<p>Add the following configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[Unit]\nDescription=Node.js Application\nAfter=network.target\n\n[Service]\nType=simple\nUser=nodeapp\nWorkingDirectory=\/opt\/myapp\nExecStart=\/usr\/bin\/node server.js\nRestart=on-failure\nRestartSec=5\nEnvironment=NODE_ENV=production\nStandardOutput=journal\nStandardError=journal\n\n[Install]\nWantedBy=multi-user.target<\/code><\/pre>\n\n\n\n<p>Enable and start the service:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl daemon-reload\nsudo systemctl enable --now nodeapp<\/code><\/pre>\n\n\n\n<p>Check the service status:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status nodeapp<\/code><\/pre>\n\n\n\n<p>The service should show active (running). View application logs with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo journalctl -u nodeapp -f<\/code><\/pre>\n\n\n\n<p>For more advanced process management with cluster mode, log rotation, and zero-downtime reloads, look at <a href=\"https:\/\/computingforgeeks.com\/install-pm2-node-js-process-manager-on-rhel-centos-rocky\/\" target=\"_blank\" rel=\"noreferrer noopener\">PM2 process manager<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Upgrade from Node.js 22 to Node.js 24<\/h2>\n\n\n\n<p>If you are running Node.js 22 from the AppStream module or an older NodeSource repository, here is how to upgrade to Node.js 24.<\/p>\n\n\n\n<p>Remove the existing Node.js installation and disable the AppStream module if active:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf remove -y nodejs\nsudo dnf module disable -y nodejs<\/code><\/pre>\n\n\n\n<p>Add the NodeSource 24.x repository and install:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/rpm.nodesource.com\/setup_24.x | sudo bash -\nsudo dnf install -y nodejs<\/code><\/pre>\n\n\n\n<p>Verify the upgrade:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node -v\nnpm -v<\/code><\/pre>\n\n\n\n<p>After upgrading, rebuild any native modules in your projects:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/path\/to\/your\/project\nnpm rebuild<\/code><\/pre>\n\n\n\n<p>The NODE_MODULE_VERSION changed from 134 (Node.js 22) to 137 (Node.js 24), so native addons compiled for Node.js 22 will not work without a rebuild.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Node.js 22 vs Node.js 24<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Component<\/th><th>Node.js 22 (Jod)<\/th><th>Node.js 24 (Krypton)<\/th><\/tr><\/thead><tbody><tr><td>Status<\/td><td>Maintenance LTS (until Apr 2027)<\/td><td>Active LTS (until Apr 2028)<\/td><\/tr><tr><td>V8 Engine<\/td><td>12.4<\/td><td>13.6<\/td><\/tr><tr><td>npm<\/td><td>10.x<\/td><td>11.9<\/td><\/tr><tr><td>Test runner<\/td><td>Stable (basic)<\/td><td>Stable (global setup\/teardown, auto subtest)<\/td><\/tr><tr><td>Permission model<\/td><td><code>--experimental-permission<\/code><\/td><td><code>--permission<\/code> (promoted)<\/td><\/tr><tr><td><code>using<\/code> keyword<\/td><td>Not available<\/td><td>Explicit resource management<\/td><\/tr><tr><td>URLPattern<\/td><td>Requires import<\/td><td>Global (no import needed)<\/td><\/tr><tr><td>SQLite<\/td><td>Experimental<\/td><td>Stable with transactions, aggregates<\/td><\/tr><tr><td>NODE_MODULE_VERSION<\/td><td>134<\/td><td>137<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>If your project is stable on Node.js 22 and you don&#8217;t need the new features, staying on 22 through April 2027 is fine. Upgrade when you need npm 11, the V8 13.6 improvements, or when Node.js 22 enters end-of-life.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install Yarn<\/h2>\n\n\n\n<p>Some projects require Yarn. Install Yarn Classic globally:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo npm install -g yarn\nyarn --version<\/code><\/pre>\n\n\n\n<p>For Yarn 4.x (Berry), enable Corepack inside your project:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>corepack enable\nyarn set version stable<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Uninstall Node.js<\/h2>\n\n\n\n<p>To completely remove Node.js installed via NodeSource:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf remove -y nodejs\nsudo rm -f \/etc\/yum.repos.d\/nodesource*.repo\nsudo dnf clean all<\/code><\/pre>\n\n\n\n<p>For NVM installations, remove the version and optionally NVM itself:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nvm uninstall 24\nrm -rf ~\/.nvm<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Key Features in Node.js 24<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Feature<\/th><th>Details<\/th><\/tr><\/thead><tbody><tr><td>V8 Engine<\/td><td>13.6 with Float16Array, RegExp.escape(), Error.isError()<\/td><\/tr><tr><td>npm<\/td><td>11.9.0 (faster installs, improved security)<\/td><\/tr><tr><td>Permission model<\/td><td>Promoted from experimental (<code>--permission<\/code> flag)<\/td><\/tr><tr><td>Test runner<\/td><td>Stable with global setup\/teardown, automatic subtest waiting<\/td><\/tr><tr><td><code>using<\/code> keyword<\/td><td>Explicit resource management (like Python&#8217;s <code>with<\/code>)<\/td><\/tr><tr><td>URLPattern<\/td><td>Globally available without import<\/td><\/tr><tr><td>Undici 7<\/td><td>Improved fetch() with proxy support via <code>NODE_USE_ENV_PROXY<\/code><\/td><\/tr><tr><td>SQLite<\/td><td>Built-in with aggregate functions, transactions, timeouts<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Node.js Release Schedule<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Version<\/th><th>Codename<\/th><th>Status<\/th><th>End of Life<\/th><\/tr><\/thead><tbody><tr><td>Node.js 24<\/td><td>Krypton<\/td><td>Active LTS<\/td><td>April 2028<\/td><\/tr><tr><td>Node.js 22<\/td><td>Jod<\/td><td>Maintenance LTS<\/td><td>April 2027<\/td><\/tr><tr><td>Node.js 20<\/td><td>Iron<\/td><td>End of Life<\/td><td>April 2026<\/td><\/tr><tr><td>Node.js 18<\/td><td>Hydrogen<\/td><td>End of Life<\/td><td>April 2025<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Always use an Active LTS or Maintenance LTS release for production. Odd-numbered releases (23, 25) are Current releases with only 6 months of support.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Error: &#8220;gyp ERR! build error&#8221; when installing npm packages<\/h3>\n\n\n\n<p>Install the build toolchain with <code>sudo dnf install -y gcc-c++ make<\/code>. Packages like <code>bcrypt<\/code>, <code>sharp<\/code>, and <code>canvas<\/code> need <code>gcc<\/code>, <code>g++<\/code>, and <code>make<\/code> to compile native addons.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">NodeSource conflicts with AppStream nodejs module<\/h3>\n\n\n\n<p>Rocky Linux 10 enables the <code>nodejs<\/code> module stream in AppStream by default. If dnf installs Node.js 22 instead of 24, disable the module first with <code>sudo dnf module disable -y nodejs<\/code>, then install from the NodeSource repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SELinux blocks Node.js from binding to a port<\/h3>\n\n\n\n<p>Check for AVC denials with <code>sudo ausearch -m avc -ts recent<\/code>. If Node.js cannot bind to port 3000, add it to the allowed HTTP ports: <code>sudo semanage port -a -t http_port_t -p tcp 3000<\/code>. Standard ports like 80 and 443 are already allowed by default.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Firewalld blocks incoming connections to the Node.js app<\/h3>\n\n\n\n<p>Rocky Linux 10 enables firewalld by default. If external clients cannot reach your application, open the port with <code>sudo firewall-cmd --permanent --add-port=3000\/tcp && sudo firewall-cmd --reload<\/code>. Confirm with <code>sudo firewall-cmd --list-ports<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Wrong Node.js version after NodeSource install<\/h3>\n\n\n\n<p>The AppStream <code>nodejs<\/code> module may still be active. Disable it with <code>sudo dnf module disable -y nodejs<\/code>, remove the old package with <code>sudo dnf remove -y nodejs<\/code>, then reinstall from NodeSource. Verify with <code>which node<\/code> to confirm <code>\/usr\/bin\/node<\/code> points to the NodeSource version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Error: &#8220;EACCES: permission denied&#8221; with npm install -g<\/h3>\n\n\n\n<p>If you used NVM, never run <code>npm install -g<\/code> with sudo. NVM installs Node.js in your home directory, so global installs work without root. If you used NodeSource, <code>sudo npm install -g<\/code> is the correct approach.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Native modules break after upgrading from Node.js 22<\/h3>\n\n\n\n<p>Run <code>npm rebuild<\/code> in your project directory. Node.js 24 uses NODE_MODULE_VERSION 137 (up from 134 in Node.js 22), so all native addons need recompilation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Error: &#8220;MODULE_NOT_FOUND&#8221; after Node.js upgrade<\/h3>\n\n\n\n<p>Delete <code>node_modules<\/code> and reinstall dependencies: <code>rm -rf node_modules package-lock.json && npm install<\/code>. This catches cases where cached modules are incompatible with the new Node.js version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Is Node.js 24 LTS ready for production on Rocky Linux?<\/h3>\n\n\n\n<p>Yes. Node.js 24 entered Active LTS in October 2025 and receives full support including bug fixes and security patches through April 2028. The NodeSource RPM packages are tested on RHEL-compatible distributions and work identically on Rocky Linux, AlmaLinux, and RHEL.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Should I use the AppStream module or NodeSource?<\/h3>\n\n\n\n<p>The AppStream module provides Node.js 22, which is fine if you don&#8217;t need the latest features. NodeSource gives you Node.js 24 with faster updates when new patch releases come out. For production servers that need the latest LTS, NodeSource is the better choice. For environments that prioritize RHEL-certified packages, the AppStream module is more conservative.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Will NodeSource packages work on AlmaLinux and RHEL too?<\/h3>\n\n\n\n<p>Yes. Rocky Linux, AlmaLinux, and RHEL 10 are binary-compatible. The same NodeSource RPM repository works on all three without modification. The commands in this guide apply to all RHEL-family distributions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Should I upgrade from Node.js 22 to 24?<\/h3>\n\n\n\n<p>If your project works on Node.js 22, there is no rush. Node.js 22 receives maintenance patches until April 2027. Upgrade when you need npm 11, V8 13.6 features, or the stable permission model.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I run multiple Node.js versions on the same server?<\/h3>\n\n\n\n<p>Yes. Use NVM to install and switch between versions: <code>nvm install 22<\/code>, <code>nvm install 24<\/code>, then <code>nvm use 24<\/code> for the version you need. Each version gets its own npm global packages.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does Node.js 24 need special SELinux policies on Rocky Linux?<\/h3>\n\n\n\n<p>No. Node.js works with the default SELinux policy on Rocky Linux 10. The only case where you need a manual policy adjustment is when binding to a non-standard port. Use <code>sudo semanage port -a -t http_port_t -p tcp YOUR_PORT<\/code> if you run into AVC denials.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>Node.js 24 LTS is running on your Rocky Linux 10 server with npm 11.9, V8 13.6, and a stable built-in test runner. The same steps work on AlmaLinux 10 and RHEL 10 without modification. For the <a href=\"https:\/\/computingforgeeks.com\/nodejs-24-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ubuntu 24.04\/22.04 equivalent<\/a>, use the DEB variant of NodeSource. For <a href=\"https:\/\/computingforgeeks.com\/nodejs-24-debian\/\" target=\"_blank\" rel=\"noreferrer noopener\">Debian 13\/12<\/a>, the same DEB repository applies. Check the <a href=\"https:\/\/nodejs.org\/en\/blog\/release\/v24.0.0\" target=\"_blank\" rel=\"noreferrer noopener\">official Node.js 24 release notes<\/a> for the full list of breaking changes and new APIs.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Rocky Linux 10 bundles Node.js 22 in AppStream, which covers most use cases. But if you need npm 11&#8217;s faster dependency resolution, V8 13.6 for Float16Array support, or the promoted permission model, Node.js 24 Krypton is the current Active LTS and the right move. This guide walks through three ways to install Node.js 24 on &#8230; <a title=\"Install Node.js 24 LTS on Rocky Linux 10 \/ AlmaLinux 10\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/nodejs-24-rocky-almalinux\/\" aria-label=\"Read more about Install Node.js 24 LTS on Rocky Linux 10 \/ AlmaLinux 10\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":164327,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36301,690,299,50,35910],"tags":[36738,669,282,360,35904],"cfg_series":[],"class_list":["post-164324","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-almalinux","category-dev","category-how-to","category-linux-tutorials","category-rocky-linux","tag-almalinux","tag-dev","tag-linux","tag-nodejs","tag-rocky-linux"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/164324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=164324"}],"version-history":[{"count":5,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/164324\/revisions"}],"predecessor-version":[{"id":164404,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/164324\/revisions\/164404"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/164327"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=164324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=164324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=164324"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=164324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}