#1033071 nodejs: Build errors on node-js packages due to support for tsc 3.6

Package:
nodejs
Source:
nodejs
Description:
evented I/O for V8 javascript - runtime executable
Submitter:
Walter Lozano
Date:
2023-03-16 22:27:05 UTC
Severity:
normal
#1033071#5
Date:
2023-03-16 14:09:42 UTC
From:
To:
Dear Maintainer,

In commit [1] a symlink to @types/node/tsc3.6 was included to mitigate
regression introduced in 12.22.12 which dropped support for tsc 3.6 (Closes:
#1014914)

With this fix, other packages start to experience build errors, as example

$ docker run -it --rm debian:bullseye-slim sh -c 'cat /etc/apt/sources.list |
sed s/^deb/deb-src/ > /etc/apt/sources.list.d/srcs.list && apt update && apt
install --no-install-recommends -y apt-src && apt-src install node-babel7 &&
apt-src build node-babel7'
...
cp -rL /usr/share/nodejs/\@types/node ./node_modules/\@types
cp: cannot copy cyclic symbolic link '/usr/share/nodejs/@types/node/tsc3.6'
dh_auto_configure: error: cp -rL /usr/share/nodejs/\@types/node
./node_modules/\@types returned exit code 1
make: *** [debian/rules:15: binary] Error 255
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
E: Building failed

I cannot confirm how many packages are affected but an initial list is:

- node-babel7
- node-domutils
- node-follow-redirects
- node-htmlparser2
- node-jschardet
- node-recast

[1] https://salsa.debian.org/js-
team/nodejs/-/commit/c7b5bc3fb81df93b194bd9caa46bea6f226a9f7a

Thanks in advance!

Walter