• Home
  • Raw
  • Download

Lines Matching +full:node +full:- +full:version

1 # Building Node.js
8 [Node.js issue tracker](https://github.com/nodejs/node/issues) or
13 * [Supported platforms](#supported-platforms)
16 * [Platform list](#platform-list)
17 * [Supported toolchains](#supported-toolchains)
18 * [Official binary platforms and toolchains](#official-binary-platforms-and-toolchains)
19 * [OpenSSL asm support](#openssl-asm-support)
20 * [Previous versions of this document](#previous-versions-of-this-document)
21 * [Building Node.js on supported platforms](#building-nodejs-on-supported-platforms)
22 * [Note about Python](#note-about-python)
23 * [Unix and macOS](#unix-and-macos)
24 * [Unix prerequisites](#unix-prerequisites)
25 * [macOS prerequisites](#macos-prerequisites)
26 * [Building Node.js](#building-nodejs-1)
27 * [Installing Node.js](#installing-nodejs)
28 * [Running Tests](#running-tests)
29 * [Running Coverage](#running-coverage)
30 * [Building the documentation](#building-the-documentation)
31 * [Building a debug build](#building-a-debug-build)
32 * [Building an ASan build](#building-an-asan-build)
33 … * [Speeding up frequent rebuilds when developing](#speeding-up-frequent-rebuilds-when-developing)
34 * [Troubleshooting Unix and macOS builds](#troubleshooting-unix-and-macos-builds)
37 * [Option 1: Manual install](#option-1-manual-install)
38 * [Option 2: Automated install with Boxstarter](#option-2-automated-install-with-boxstarter)
39 * [Building Node.js](#building-nodejs-2)
41 * [`Intl` (ECMA-402) support](#intl-ecma-402-support)
42 …l ICU support (all locales supported by ICU)](#build-with-full-icu-support-all-locales-supported-b…
44 * [Windows](#windows-1)
45 * [Trimmed: `small-icu` (English only) support](#trimmed-small-icu-english-only-support)
46 * [Unix/macOS](#unixmacos-1)
47 * [Windows](#windows-2)
48 * [Building without Intl support](#building-without-intl-support)
49 * [Unix/macOS](#unixmacos-2)
50 * [Windows](#windows-3)
51 * [Use existing installed ICU (Unix/macOS only)](#use-existing-installed-icu-unixmacos-only)
52 * [Build with a specific ICU](#build-with-a-specific-icu)
53 * [Unix/macOS](#unixmacos-3)
54 * [Windows](#windows-4)
55 * [Configuring OpenSSL config appname](#configure-openssl-appname)
56 * [Building Node.js with FIPS-compliant OpenSSL](#building-nodejs-with-fips-compliant-openssl)
57 * [Building Node.js with external core modules](#building-nodejs-with-external-core-modules)
58 * [Unix/macOS](#unixmacos-4)
59 * [Windows](#windows-5)
60 * [Note for downstream distributors of Node.js](#note-for-downstream-distributors-of-nodejs)
69 Node.js relies on V8 and libuv. We adopt a subset of their supported platforms.
75 * **Tier 1**: These platforms represent the majority of Node.js users. The
76 Node.js Build Working Group maintains infrastructure for full test coverage.
78 * **Tier 2**: These platforms represent smaller segments of the Node.js user
79 base. The Node.js Build Working Group maintains infrastructure for full test
92 Node.js compilation/execution support depends on operating system, architecture,
93 and libc version. The table below lists the support tier for each supported
94 combination. A list of [supported compile toolchains](#supported-toolchains) is
97 **For production applications, run Node.js on supported platforms only.**
99 Node.js does not support a platform version if a vendor has expired support
100 for it. In other words, Node.js does not support running on End-of-Life (EoL)
104---------------- | ---------------- | --------------------------------- | ------------------------…
107 …2.17 | Experimental | Downgraded as of Node.js 10 |
110 …2.24 | Experimental | Downgraded as of Node.js 12 |
123 [^1]: Older kernel versions may work. However official Node.js release
124 binaries are [built on RHEL 8 systems](#official-binary-platforms-and-toolchains)
127 [^2]: On Windows, running Node.js in Windows terminal emulators
129 for the tty channels to work (e.g. `winpty node.exe script.js`).
130 In "Git bash" if you call the node shell alias (`node` without the `.exe`
138 Windows binary (`node.exe`) in WSL will not work without workarounds such as
141 [^4]: Running Node.js on x86 Windows should work and binaries
154 | ---------------- | -------------------------------------------------------------- |
156 | Windows | Visual Studio >= 2019 with the Windows 10 SDK on a 64-bit host |
164 | ----------------------- | -----------------------------------------------------------------------…
165 | aix-ppc64 | AIX 7.2 TL04 on PPC64BE with GCC 8 …
166 | darwin-x64 | macOS 10.15, Xcode Command Line Tools 11 with -mmacosx-version-min=10.1…
167 | darwin-arm64 (and .pkg) | macOS 11 (arm64), Xcode Command Line Tools 12 with -mmacosx-version-min…
168 | linux-arm64 | RHEL 8 with GCC 8[^6] …
169 | linux-armv7l | Cross-compiled on Ubuntu 18.04 x64 with [custom GCC toolchain](https://…
170 | linux-ppc64le | RHEL 8 with GCC 8[^6] …
171 | linux-s390x | RHEL 8 with GCC 8[^6] …
172 | linux-x64 | RHEL 8 with GCC 8[^6] …
173 | win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2019 …
182 OpenSSL-1.1.1 requires the following assembler version for use of asm
185 For use of AVX-512,
187 * gas (GNU assembler) version 2.26 or higher
188 * nasm version 2.11.8 or higher in Windows
190 AVX-512 is disabled for Skylake-X by OpenSSL-1.1.1.
194 * gas (GNU assembler) version 2.23 or higher
195 * Xcode version 5.0 or higher
196 * llvm version 3.3 or higher
197 * nasm version 2.10 or higher in Windows
203 `--openssl-no-asm` flag. Otherwise, `configure` will fail.
207 Supported platforms and toolchains change with each major version of Node.js.
208 This document is only valid for the current major version of Node.js.
209 Consult previous versions of this document for older versions of Node.js:
211 * [Node.js 19](https://github.com/nodejs/node/blob/v19.x/BUILDING.md)
212 * [Node.js 18](https://github.com/nodejs/node/blob/v18.x/BUILDING.md)
213 * [Node.js 16](https://github.com/nodejs/node/blob/v16.x/BUILDING.md)
215 ## Building Node.js on supported platforms
219 The Node.js project supports Python >= 3 for building and testing.
232 * Ubuntu, Debian: `sudo apt-get install python3 g++ make python3-pip`
233 * Fedora: `sudo dnf install python3 gcc-c++ make python3-pip`
234 * CentOS and RHEL: `sudo yum install python3 gcc-c++ make python3-pip`
235 * OpenSUSE: `sudo zypper install python3 gcc-c++ make python3-pip`
236 * Arch Linux, Manjaro: `sudo pacman -S python gcc make python-pip`
247 `xcode-select --install`. Alternatively, if you already have the full Xcode
248 installed, you can find them under the menu `Xcode -> Open Developer Tool ->
252 #### Building Node.js
257 To build Node.js:
261 $ make -j4
264 We can speed up the builds by using [Ninja](https://ninja-build.org/). For more
266 [Building Node.js with Ninja](doc/contributing/building-node-with-ninja.md).
268 The `-j4` option will cause `make` to run 4 simultaneous compilation jobs which
272 The above requires that `python` resolves to a supported version of
275 After building, setting up [firewall rules](tools/macos-firewall.sh) can avoid
279 executable `node` in the `out` directory and the symbolic `node` link in the
283 $ sudo ./tools/macos-firewall.sh
286 #### Installing Node.js
288 To install this version of Node.js into a system directory:
299 $ make test-only
302 At this point, you are ready to make code changes and re-run the tests.
307 $ make -j4 test
310 `make -j4 test` does a full check on the codebase, including running linters and
317 (e.g. `test/parallel/test-stream2-transform.js`):
320 $ tools/test.py test/parallel/test-stream2-transform.js
327 $ tools/test.py child-process
338 the `--help` option:
341 $ tools/test.py --help
347 You can usually run tests directly with node:
350 $ ./node test/parallel/test-stream2-transform.js
353 > Info: `./node` points to your local Node.js build.
355 Remember to recompile with `make -j4` in between test runs if you change code in
365 sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
369 [node-code-ide-configs](https://github.com/nodejs/node-code-ide-configs)
378 $ ./configure --coverage
386 the first command (`./configure --coverage`). Run `make coverage-run-js`,
390 $ make coverage-run-js
394 (e.g. `test/parallel/test-stream2-transform.js`):
397 $ make coverage-clean
398 $ NODE_V8_COVERAGE=coverage/tmp tools/test.py test/parallel/test-stream2-transform.js
399 $ make coverage-report-js
406 $ make coverage-clean
407 $ NODE_V8_COVERAGE=coverage/tmp tools/test.py --mode=release child-process
408 $ make coverage-report-js
415 $ make coverage-clean
422 This will build Node.js first (if necessary) and then use it to build the docs:
428 If you have an existing Node.js build, you can build just the docs with:
431 NODE=/path/to/node make doc-only
437 man doc/node.1
456 This will open a file URL to a one-page version of all the browsable HTML
459 To test if Node.js was built correctly:
462 ./node -e "console.log('Hello from Node.js ' + process.version)"
472 $ ./configure --debug
473 $ make -j4
476 `make` with `./configure --debug` generates two binaries, the regular release
477 one in `out/Release/node` and a debug binary in `out/Debug/node`, only the
478 release version is actually installed when you run `make install`.
481 version in the install directory:
484 $ make install PREFIX=/opt/node-debug/
485 $ cp -a -f out/Debug/node /opt/node-debug/node
493 was captured on (i.e. 64-bit `gdb` for `node` built on a 64-bit system, Linux
494 `gdb` for `node` built on Linux) otherwise you will get errors like
500 $ gdb /opt/node-debug/node core.node.8.1535359906
509 on Linux, you can try [Docker](https://www.docker.com/products/docker-desktop)
510 (using an image like `gengjiawen/node-build:2020-02-14`).
512 The `--debug` is not necessary and will slow down build and testing, but it can
516 $ ./configure --debug --enable-asan && make -j4
517 $ make test-only
522 If you plan to frequently rebuild Node.js, especially if using several branches,
541 This will allow for near-instantaneous rebuilds even when switching branches.
547 $ ./configure --node-builtin-modules-path "$(pwd)"
552 configuration since the November 2020 version and allows for setting
560 build again (`make -j4`). Since all build artifacts have been removed, this
563 ran `./configure` with non-default options (such as `--debug`), you will need
564 to run it again before invoking `make -j4`.
572 * [Python 3.11](https://apps.microsoft.com/store/detail/python-311/9NRWMJP3717K)
574 …Studio 2019](https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2019-and-other-p…
579 [Git for Windows](https://git-scm.com/download/win) includes Git Bash
583 to `PATH`. A build with the `openssl-no-asm` option does not need this, nor
604 Windows systems with all the required prerequisites for Node.js development.
612 with [Visual C++ workload](https://chocolatey.org/packages/visualstudio2019-workload-vctools)
615 To install Node.js prerequisites using
617 <https://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/HEAD/tools/boo…
624 Set-ExecutionPolicy Unrestricted -Force
625 iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1'))
626 get-boxstarter -Force
627 Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/HEAD/tools/bootstrap/window…
634 #### Building Node.js
636 If the path to your build directory contains a space or a non-ASCII character,
649 To test if Node.js was built correctly:
652 > Release\node -e "console.log('Hello from Node.js', process.version)"
667 $ ./android-configure <path to the Android NDK> <Android SDK version> <target architecture>
668 $ make -j4
671 The Android SDK version should be at least 24 (Android 7.0) and the target
674 ## `Intl` (ECMA-402) support
676 [Intl](https://github.com/nodejs/node/blob/HEAD/doc/api/intl.md) support is
686 $ ./configure --with-intl=full-icu
692 > .\vcbuild full-icu
695 ### Trimmed: `small-icu` (English only) support
698 the full `Intl` (ECMA-402) APIs. It does not need to download
704 $ ./configure --with-intl=small-icu
710 > .\vcbuild small-icu
721 $ ./configure --without-intl
727 > .\vcbuild without-intl
733 $ pkg-config --modversion icu-i18n && ./configure --with-intl=system-icu
736 If you are cross-compiling, your `pkg-config` must be able to supply a path
742 [the ICU homepage](http://site.icu-project.org/download).
743 Download the file named something like `icu4c-**##.#**-src.tgz` (or
746 To check the minimum recommended ICU, run `./configure --help` and see
747 the help for the `--with-icu-source` option. A warning will be printed
748 during configuration if the ICU version is too old.
752 From an already-unpacked ICU:
755 $ ./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu
761 $ ./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu.tgz
767 $ ./configure --with-intl=full-icu --with-icu-source=http://url/to/icu.tgz
773 [icu4c-**##.#**-src.tgz](http://site.icu-project.org/download) (or `.zip`)
777 > .\vcbuild full-icu
782 Node.js can use an OpenSSL configuration file by specifying the environment
783 variable `OPENSSL_CONF`, or using the command line option `--openssl-conf`, and
785 configuration file `openssl.cnf`. Node.js will only read a section that is by
790 $ ./configure --openssl-conf-name=<some_conf_name>
793 ## Building Node.js with FIPS-compliant OpenSSL
795 Node.js supports FIPS when statically or dynamically linked with OpenSSL 3 via
796 [OpenSSL's provider model](https://www.openssl.org/docs/man3.0/man7/crypto.html#OPENSSL-PROVIDERS).
797 It is not necessary to rebuild Node.js to enable support for FIPS.
799 See [FIPS mode](./doc/api/crypto.md#fips-mode) for more information on how to
800 enable FIPS support in Node.js.
802 ## Building Node.js with external core modules
805 the binary as built-in modules when building Node.js.
814 $ ./configure --link-module '/root/myModule.js' --link-module './myModule2.js'
823 > .\vcbuild link-module './myModule.js' link-module './myModule2.js'
828 By default Node.js is built so that all dependencies are bundled into
829 the Node.js binary itself. This provides a single binary that includes
832 Some Node.js distributions, however, prefer to manage dependencies.
836 Node.js to be built so that it uses a shared library
838 in the Node.js binary itself. These options are in the
840 (run `./configure --help` to get the complete list).
846 set of options allow the Node.js binary to be built so that it loads
848 the Node.js binary itself. These options are in the `Shared builtins`
850 (run `./configure --help` to get the complete list). They
858 match what is expected by the Node.js binary. A
860 * fully test that Node.js operates as expected with the
862 within the Node.js project CI for these non-default options.
864 ## Note for downstream distributors of Node.js
866 The Node.js ecosystem is reliant on ABI compatibility within a major release.
867 To maintain ABI compatibility it is required that distributed builds of Node.js
868 be built against the same version of dependencies, or similar versions that do
869 not break their ABI compatibility, as those released by Node.js for any given
872 When Node.js is built (with an intention to distribute) with an ABI
873 incompatible with the official Node.js builds (e.g. using a ABI incompatible
874 version of a dependency), please reserve and use a custom `NODE_MODULE_VERSION`
876 <https://github.com/nodejs/node/blob/HEAD/doc/abi_version_registry.json>.