Source: node-zx
Version: 7.1.1+~cs6.7.23-1
Severity: serious
Tag: ftbfs patch

Dear Maintainer,

node-zx currently fails to build with the following error messages:
   FAIL  deps  "installDeps() loader works via JS API"
Cannot find package 'cpy' imported from /build/node-zx-7.1.1+~cs6.7.23/test/deps.test.js

   FAIL  deps  "installDeps() loader works via CLI"
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'lodash' imported from /build/node-zx-7.1.1+~cs6.7.23/zx-kdsc9wx1fn.mjs
Did you mean to import lodash/lodash.js?
    at new NodeError (node:internal/errors:393:5)
    at packageResolve (node:internal/modules/esm/resolve:860:9)
    at moduleResolve (node:internal/modules/esm/resolve:909:20)
    at defaultResolve (node:internal/modules/esm/resolve:1124:11)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:841:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
    at link (node:internal/modules/esm/module_job:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}
at Object.handler (file:///build/node-zx-7.1.1+~cs6.7.23/test/deps.test.js:35:12)
    exit code: 1

(See https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/node-zx.html for more details)

I was able to reproduce the same error message when building in pbuilder on my local Sid system. Turns out there's a couple of tests which call `npm install` and verify the results which breaks when the network is not available.

After expanding and applying the patch to disable network tests, the package builds successfully.


-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-5-amd64 (SMP w/3 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled


--
mvh / best regards
Hans Joachim Desserud
http://desserud.org
diff --git a/debian/patches/drop-network-test.patch b/debian/patches/drop-network-test.patch
index cf5cd17..905f6a8 100644
--- a/debian/patches/drop-network-test.patch
+++ b/debian/patches/drop-network-test.patch
@@ -1,7 +1,7 @@
 Description: drop network test
 Author: Yadd <y...@debian.org>
 Forwarded: not-needed
-Last-Update: 2022-11-07
+Last-Update: 2022-12-17
 
 --- a/test/cli.test.js
 +++ b/test/cli.test.js
@@ -37,3 +37,24 @@ Last-Update: 2022-11-07
  test('echo() works', async () => {
    let stdout = ''
    let log = console.log
+--- a/test/deps.test.js
++++ b/test/deps.test.js
+@@ -21,7 +21,7 @@ const test = suite('deps')
+ 
+ $.verbose = false
+ 
+-test('installDeps() loader works via JS API', async () => {
++test.skip('installDeps() loader works via JS API', async () => {
+   await installDeps({
+     cpy: '9.0.1',
+     'lodash-es': '4.17.21',
+@@ -30,7 +30,7 @@ test('installDeps() loader works via JS
+   assert.instance((await import('lodash-es')).pick, Function)
+ })
+ 
+-test('installDeps() loader works via CLI', async () => {
++test.skip('installDeps() loader works via CLI', async () => {
+   let out =
+     await $`node build/cli.js --install <<< 'import _ from "lodash" /* @4.17.15 */; console.log(_.VERSION)'`
+   assert.match(out.stdout, '4.17.15')
+

Reply via email to