Node.js is a free, open-source, cross-platform JavaScript runtime environment
that lets developers create servers, web apps, command line tools and scripts.
===> The following configuration options are available for node26-26.12.1:
BUNDLED_SSL=off: Use bundled OpenSSL implementation from node.js
DOCS=on: Build and/or install documentation
JIT=on: Use Just In Time compiler
===> Use 'make config' to modify these settings
Affects: users of USES=nodejs, www/node*, www/npm* and www/yarn*
Author: sunpoet@FreeBSD.org
Reason:
The current USES=nodejs has the following issues:
- www/node is not the default version while www/node16 is.
- It also means inconsistent naming of node ports.
- www/npm duplicates with www/npm-node16.
- www/yarn duplicates with www/yarn-node16.
The notable changes are introduced to fix the above issues:
- Rewrite Mk/Uses/nodejs.mk.
- Add new LTS version of nodejs (www/node18).
- Add new current version of nodejs (www/node19).
- Change default nodejs version from 16 to 18 (latest LTS),
- Use consistent naming for all supported node versions.
- Convert www/node, www/npm and www/yarn to meta ports.
After these changes:
- All supported node versions are named as node{14,16,18,19}.
- www/node is a meta port which depends on the default version
(e.g. www/node18)
- www/npm is a meta port which depends on the default version
(e.g. www/npm-node18)
- www/yarn is a meta port which depends on the default version
(e.g. www/yarn-node18)
Reason:
The port framework was updated to use a default version for nodejs.
The default version is pointing to the latest LTS version which is
currently version 16.
You can overwrite this by defining in /etc/make.conf, e.g. version 17:
DEFAULT_VERSIONS=nodejs=17
Or if you would like to stick always to the current version use:
DEFAULT_VERSIONS=nodejs=current
If you would like to use yarn or npm together with nodejs version 17,
just install the package that is pulling the wanted dependency to nodejs:
# pkg install yarn-node17
# pkg install npm-node17
port moved here from www/node25 on 2026-06-30 REASON: Has expired: Node.js 25.* will reach its EoL on 2026-06-01. Use Node.js 26.* (www/node26) instead
www/node26: fix safepoints after calls on powerpc64*
Backport V8 f331137d5968. The assembler can put its trampoline pool
right after a call, and the safepoint and exception handler for that
call are then recorded at the wrong address, so the GC can scan the
wrong stack slots and exceptions can skip their catch block.
www/node26: fix Maglev on powerpc64
Maglev's PowerPC code loads a whole word where it should test one byte
of the map, so it checks the wrong byte on big endian. Once a function
gets optimized, "x == null" and "typeof x" give wrong results.
www/node2{2,4,6}: detect the CPU on powerpc64*
V8 only detects the CPU on Linux and AIX. On FreeBSD it assumes the
oldest CPU it supports, so node 22 and 24 never use POWER9 code and
reject every Wasm module that uses SIMD. Read the ISA level from
AT_HWCAP and AT_HWCAP2 instead.
www/node2{2,4,6}: Use bundled merve to avoid loading two simdutfs
node dies with SIGBUS (signal 10) the first time it lexes the exports
of a CommonJS module, e.g. early in any `npm install`, for example
www/tailwindcss4 fails to build, reporting "*** Signal 10".
Running lldb inside poudriere build, because we get a core dump:
frame #0 libsimdutf.so.36 simdutf::detail::find(...) +77: jmpq *%rax
frame #1 libmerve.so.1 lexer::CJSLexer::addReexport(...)
...
frame #6 node node::cjs_lexer::Parse(...)
rax = 0x4444444443434343 ("CCCCDDDD", string data)
(Only the first 15 lines of the commit message are shown above )
www/node26: Fix build by using bundled abseil
node26 cannot build against devel/abseil. My assumption is that our
abseil port needs an update (it's 18-ish months old at this point).
For now, get node building again by using the bundled libabsl.
../deps/v8/src/base/platform/mutex.cc:63:18: error: no member named 'lock' in
'absl::Mutex'; did you mean 'Lock'?
63 | native_handle_.lock();
| ^~~~
| Lock
/usr/local/include/absl/synchronization/mutex.h:180:8: note: 'Lock' declared
here
180 | void Lock() ABSL_EXCLUSIVE_LOCK_FUNCTION();
| ^
../deps/v8/src/base/platform/mutex.cc:69:18: error: no member named 'unlock' in
'absl::Mutex'; did you mean 'Unlock'?
(Only the first 15 lines of the commit message are shown above )
www/node26: Add node26 26.0.0
Node.js is a free, open-source, cross-platform JavaScript runtime environment
that lets developers create servers, web apps, command line tools and scripts.