Overview
Building Node.js from source gives you full control over the build configuration and allows you to customize the runtime for your specific needs. This guide covers building Node.js on all supported platforms.For production applications, run Node.js on supported platforms only. See the supported platforms section for details.
Supported Platforms
Node.js supports three support tiers:- Tier 1: Majority of Node.js users. Full test coverage maintained. Test failures block releases.
- Tier 2: Smaller user segments. Full test coverage maintained. Test failures block releases.
- Experimental: May not compile or pass tests. No official releases.
Platform List
| Operating System | Architectures | Versions | Support Type |
|---|---|---|---|
| GNU/Linux | x64 | kernel >= 4.18, glibc >= 2.28 | Tier 1 |
| GNU/Linux | arm64 | kernel >= 4.18, glibc >= 2.28 | Tier 1 |
| Windows | x64 | >= Windows 10/Server 2016 | Tier 1 |
| macOS | x64, arm64 | >= 13.5 | Tier 1 |
| GNU/Linux | ppc64le (>=power9) | kernel >= 4.18, glibc >= 2.28 | Tier 2 |
| GNU/Linux | s390x (>=z14) | kernel >= 4.18, glibc >= 2.28 | Tier 2 |
Supported Toolchains
| Operating System | Compiler Versions |
|---|---|
| Linux | GCC >= 12.2 or Clang >= 19.1 |
| Windows | Visual Studio 2022 or 2026 with Windows 10 or 11 SDK |
| macOS | Xcode >= 16.4 (Apple LLVM >= 19) |
Prerequisites
All Platforms
- A supported version of Python (for building and testing)
- At least 8GB of RAM for compilation
Building on Unix and macOS
Unix Prerequisites
Install the required dependencies:macOS Prerequisites
Install Xcode Command Line Tools:Xcode -> Open Developer Tool -> More Developer Tools...
Building Node.js
Installing Node.js
To install the built version to a system directory:Running Tests
Verify the build works correctly:Building on Windows
Windows Prerequisites
- Manual Install
- Automated Install with WinGet
- Install the current version of Python from python.org
- Download Visual Studio Community Edition 2026 or Build Tools for Visual Studio 2026
- During installation, select “Desktop development with C++” workload
- Install these optional components:
- C++ Clang Compiler for Windows
- MSBuild support for LLVM (clang-cl) toolset
- Install Git for Windows (includes Git Bash and Unix tools)
- Install NetWide Assembler (NASM) for OpenSSL assembler modules
Building Node.js on Windows
Build Configuration Options
Debug Build
Create a debug build for detailed error information:out/Release/node- Release versionout/Debug/node- Debug version with symbols
ICU (Internationalization) Support
- Full ICU (Default)
- Small ICU (English only)
- Without Intl
Building with ccache
Speed up rebuilds by using ccache:Troubleshooting
Stale Builds
If you encounter “file not found” errors:Memory Issues
If you receive compilation errors likeg++ fatal error compilation terminated:
- Provide more RAM
- Create swap space
- Reduce parallel build tasks:
make -j2instead ofmake -j4
Path with Spaces
Avoid build directories with spaces or non-ASCII characters in the path. This will likely cause the build to fail.Advanced Options
ASan Build
Build with Address Sanitizer to detect memory bugs:Loading JS Files from Disk
For faster development, load JS files externally instead of embedding:Building with Ninja
For faster builds, use Ninja instead of Make. See the Building Node.js with Ninja guide.Next Steps
Testing
Learn how to run and write tests
Debugging
Debug your Node.js build
Performance
Profile and optimize your code
Security
Security best practices