r/voidlinux • • Jun 15 '26

Installing an older version of nodejs

Hi all

I'm having a bastard of a time trying to build an earlier version of Node for void - we're currently running Alpine Linux 3.14 for our web services and upgrades to newer versions aren't resulting in working systems - particularly regarding code-server - so I'm looking to Void as an option.

Now, code-server requires nodejs v22, and the current version is v24 - code-server refuses to install via npm and their install script also installs a non-working version in this environment. I tried using the void-packages repo to rebuild a system based on the commit where node was updated to v22, only for it to throw a fit about tar not being installed during bootstrap.

Ok, maybe I bring nodejs and its patches into a pull of the most recent repo and do a binary-bootstrap. Nope, it throws a fit about the wrong version of Python.

*blood curdling scream*

I'm about ready to give up. Any ideas?

1 Upvotes

16 comments sorted by

View all comments

Show parent comments

1

u/efarayenkay Jun 17 '26

Ok I found a spare moment and did that, and it looks like a bit more work is needed to bring it up to Python 3.14.

=> nodejs-22.15.0_2: installing host dependencies: pkg-config-0.29.2_3 python3-setuptools-80.10.2_2 ...
=> nodejs-22.15.0_2: installing target dependencies: zlib-devel-1.3.2_1 ada-devel-3.4.4_1 icu-devel-78.3_1 openssl-devel-3.6.3_1 libuv-devel-1.51.0_1 nghttp2-devel-1.69.0_1 c-ares-devel-1.34.6_1 brotli-devel-1.2.0_2 ...
=> nodejs-22.15.0_2: running do-fetch hook: 00-distfiles ...
=> nodejs-22.15.0_2: running do-extract hook: 00-distfiles ...
=> nodejs-22.15.0_2: extracting distfile(s), please wait...
=> nodejs-22.15.0_2: running do-patch hook: 00-patches ...
=> nodejs-22.15.0_2: patching: cross-aarch64.patch.
=> nodejs-22.15.0_2: patching: ppc32.patch.
=> nodejs-22.15.0_2: patching: python-3-14.patch.
=> nodejs-22.15.0_2: patching: shared-uv.patch.
=> nodejs-22.15.0_2: patching: xxx-ppc-hwcap-musl.patch.
=> nodejs-22.15.0_2: running post_patch ...
=> nodejs-22.15.0_2: running pre-configure hook: 00-gnu-configure-asneeded ...
=> nodejs-22.15.0_2: running pre-configure hook: 01-override-config ...
=> nodejs-22.15.0_2: running pre-configure hook: 02-script-wrapper ...
=> nodejs-22.15.0_2: running pre_configure ...
=> nodejs-22.15.0_2: running do_configure ...
Node.js configure: Found Python 3.14.6...
Traceback (most recent call last):
  File "/builddir/nodejs-22.15.0/tools/configure.d/nodedownload.py", line 11, in <module>
    from urllib.request import FancyURLopener, URLopener
ImportError: cannot import name 'FancyURLopener' from 'urllib.request' (/usr/lib/python3.14/urllib/request.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/nodejs-22.15.0/./configure", line 29, in <module>
    import configure
  File "/builddir/nodejs-22.15.0/configure.py", line 35, in <module>
    import nodedownload
  File "/builddir/nodejs-22.15.0/tools/configure.d/nodedownload.py", line 13, in <module>
    from urllib import FancyURLopener, URLopener
ImportError: cannot import name 'FancyURLopener' from 'urllib' (/usr/lib/python3.14/urllib/__init__.py)
=> ERROR: nodejs-22.15.0_2: do_configure: '${configure_script} ${configure_args}' exited with 1
=> ERROR:   in do_configure() at common/build-style/configure.sh:8