#1063530 node-undici: FTBFS with nodejs 18.19.0+dfsg-6~deb12u1

#1063530#5
Date:
2024-02-09 13:27:54 UTC
From:
To:
Hello,

While doing a rebuild of some node packages in Bookworm, it appears several
packages (at least ~ 50 pkgs) no longer build with nodejs 18.19.0+dfsg-6~deb12u1
(from bookworm-security repo) while they still successfully build with nodejs
18.13.0+dfsg1-1 (from the main bookworm repo). They all fail with the
same error:
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

Since, I am not sure which package need to be fixed (nodejs, node-undici or
all of them), I fill this bug against the package referred by the error message,
please reassign to the relevent package.

Below is the relevant part of the log:

   dh_auto_build --buildsystem=nodejs
Found debian/nodejs/additional_components
Adding component(s): types
/!\ types/package.json not found
/!\ types/package.json not found
Unable to load types
No build command found, searching known files
Found debian/nodejs/llparse-builder/build
    cd ./llparse-builder && sh -ex ../debian/nodejs/llparse-builder/build
+ tsc
../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:325:84 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

325         type _Request = typeof globalThis extends { onmessage: any
} ? {} : import("undici-types").Request;

                ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:326:85 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

326         type _Response = typeof globalThis extends { onmessage:
any } ? {} : import("undici-types").Response;

                 ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:327:85 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

327         type _FormData = typeof globalThis extends { onmessage:
any } ? {} : import("undici-types").FormData;

                 ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:328:84 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

328         type _Headers = typeof globalThis extends { onmessage: any
} ? {} : import("undici-types").Headers;

                ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:330:22 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

330             : import("undici-types").RequestInit;
                         ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:336:35 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

336         type RequestInfo = import("undici-types").RequestInfo;
                                      ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:337:35 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

337         type HeadersInit = import("undici-types").HeadersInit;
                                      ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:338:32 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

338         type BodyInit = import("undici-types").BodyInit;
                                   ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:339:39 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

339         type RequestRedirect = import("undici-types").RequestRedirect;
                                          ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:340:42 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

340         type RequestCredentials = import("undici-types").RequestCredentials;
                                             ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:341:35 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

341         type RequestMode = import("undici-types").RequestMode;
                                      ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:342:38 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

342         type ReferrerPolicy = import("undici-types").ReferrerPolicy;
                                         ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:343:34 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

343         type Dispatcher = import("undici-types").Dispatcher;
                                     ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:344:37 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

344         type RequestDuplex = import("undici-types").RequestDuplex;
                                        ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:360:21 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

360     : typeof import("undici-types").Request;
                        ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:367:21 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

367     : typeof import("undici-types").Response;
                        ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:374:21 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

374     : typeof import("undici-types").FormData;
                        ~~~~~~~~~~~~~~

../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:381:21 -
error TS2307: Cannot find module 'undici-types' or its corresponding
type declarations.

381     : typeof import("undici-types").Headers;
                        ~~~~~~~~~~~~~~


Found 18 errors in the same file, starting at:
../../../../usr/share/nodejs/@types/node/ts4.8/globals.d.ts:325

dh_auto_build: error: cd ./llparse-builder && sh -ex
../debian/nodejs/llparse-builder/build returned exit code 2



Best regards,
Dylan

#1063530#10
Date:
2024-02-13 08:50:30 UTC
From:
To:
Control: tag -1 patch
https://salsa.debian.org/js-team/node-undici/-/merge_requests/2/

Thanks Ryan!

Best regards,
Dylan

#1063530#17
Date:
2024-02-13 18:50:20 UTC
From:
To:
Le ven. 9 févr. 2024 à 14:33, Dylan Aïssi <bob.dybian@gmail.com> a écrit :


The latest nodejs (security | branch) update needs node-undici to export
its own "undici-types".
It seems that it doesn't, and that's probably my mistake.

Once that is fixed, three other packages need their test suites to be fixed
and uploaded to stable-proposed-updates.
-zx/-/commit/a7d2861413480261890db147ea367a252192c9f2
-v8-compile-cache/-/commit/df42bdbfe84811e4da11d8c3d8ef3148d8a77bcc
-babel/-/commit/e5c88f4d765e4d64b60c9cf333dedb89abba39c5