#1150087 node-ajv: FTBFS: Error: Cannot find module 'nanoid'

#1150087#5
Date:
2026-10-05 16:40:51 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202610/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:node-ajv, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
+ rm -f spec/_json/*.js
+ node scripts/jsontests
+ test  !=
+ TS_NODE_SCOPE=true TS_NODE_PROJECT=spec/tsconfig.json mocha --bail --exit --timeout 100000 -r ts-node/register spec/**/*.spec.{ts,js}

 Exception during run: Error: Cannot find module 'nanoid'
Require stack:
- /<<PKGBUILDDIR>>/debian/tests/test_modules/module-from-string/dist/index.js
- /<<PKGBUILDDIR>>/spec/standalone.spec.ts
- /usr/share/nodejs/mocha/lib/nodejs/esm-utils.cjs
- /usr/share/nodejs/mocha/lib/cli/run-helpers.cjs
    at Module.<anonymous> (node:internal/modules/cjs/loader:1564:15)
    at Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/usr/share/nodejs/@cspotcode/source-map-support/source-map-support.js:811:30)
    at wrapResolveFilename (node:internal/modules/cjs/loader:1118:27)
    at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1142:10)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1169:12)
    at Module._load (node:internal/modules/cjs/loader:1341:5)
    at wrapModuleLoad (node:internal/modules/cjs/loader:261:19)
    at Module.require (node:internal/modules/cjs/loader:1674:12)
    at require (node:internal/modules/helpers:157:16)
    at Module.<anonymous> (/<<PKGBUILDDIR>>/debian/tests/test_modules/module-from-string/dist/index.js:5:16)
    at Module._compile (node:internal/modules/cjs/loader:1929:14)
    at Module.m._compile (/usr/share/nodejs/ts-node/src/index.ts:1624:23)
    at node:internal/modules/cjs/loader:2060:10
    at Object.require.extensions.<computed> [as .js] (/usr/share/nodejs/ts-node/src/index.ts:1627:12)
    at Module.load (node:internal/modules/cjs/loader:1651:32)
    at Module._load (node:internal/modules/cjs/loader:1443:12)
    at wrapModuleLoad (node:internal/modules/cjs/loader:261:19)
    at Module.require (node:internal/modules/cjs/loader:1674:12)
    at require (node:internal/modules/helpers:157:16)
    at Object.<anonymous> (/<<PKGBUILDDIR>>/spec/standalone.spec.ts:7:1)
    at Module._compile (node:internal/modules/cjs/loader:1929:14)
    at Module.m._compile (/usr/share/nodejs/ts-node/src/index.ts:1624:23)
    at node:internal/modules/cjs/loader:2060:10
    at Object.require.extensions.<computed> [as .ts] (/usr/share/nodejs/ts-node/src/index.ts:1627:12)
    at Module.load (node:internal/modules/cjs/loader:1651:32)
    at Module._load (node:internal/modules/cjs/loader:1443:12)
    at wrapModuleLoad (node:internal/modules/cjs/loader:261:19)
    at Module.require (node:internal/modules/cjs/loader:1674:12)
    at require (node:internal/modules/helpers:157:16)
    at Object.requireModule [as requireOrImport] (/usr/share/nodejs/mocha/lib/nodejs/esm-utils.cjs:99:12)
    at Object.exports.loadFilesAsync (/usr/share/nodejs/mocha/lib/nodejs/esm-utils.cjs:182:34)
    at async singleRun (/usr/share/nodejs/mocha/lib/cli/run-helpers.cjs:174:3)
    at async Object.exports.handler (/usr/share/nodejs/mocha/lib/cli/run.cjs:143:5) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/<<PKGBUILDDIR>>/debian/tests/test_modules/module-from-string/dist/index.js',
    '/<<PKGBUILDDIR>>/spec/standalone.spec.ts',
    '/usr/share/nodejs/mocha/lib/nodejs/esm-utils.cjs',
    '/usr/share/nodejs/mocha/lib/cli/run-helpers.cjs'
  ]
}
dh_auto_test: error: /bin/sh -ex debian/tests/pkg-js/test returned exit code 1
make: *** [debian/rules:5: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1150087#8
Date:
2026-10-05 18:40:57 UTC
From:
To:
Hello,

Bug #1150087 in node-ajv reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/js-team/node-ajv/-/commit/6c5cbe1b72ebde9ce9bfa3418c1817dfd26c251a

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1150087

#1150087#15
Date:
2026-10-05 19:05:21 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
node-ajv, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1150087@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Xavier Guimard <yadd@debian.org> (supplier of updated node-ajv package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 05 Oct 2026 19:32:47 +0200
Source: node-ajv
Architecture: source
Version: 8.20.0~ds+~cs7.1.6-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>
Changed-By: Xavier Guimard <yadd@debian.org>
Closes: 1150087
Changes:
 node-ajv (8.20.0~ds+~cs7.1.6-2) unstable; urgency=medium
 .
   * Team upload
   * Add node-nanoid to build dependencies (Closes: #1150087)
Checksums-Sha1:
 063f63647ffcb1676fe548f35a28d9910430784c 3019 node-ajv_8.20.0~ds+~cs7.1.6-2.dsc
 7b1335dd3732f9d9ef596c16af6d53ee98fb7455 84244 node-ajv_8.20.0~ds+~cs7.1.6-2.debian.tar.xz
Checksums-Sha256:
 36f855eb8706423122732c30a97ef3aeddac8188eed3fefbc1f5b5ff069086c2 3019 node-ajv_8.20.0~ds+~cs7.1.6-2.dsc
 de631c2c52196b4ef99393159ecea12a8a9f63b3e1d649e60d5d1deeb078cc75 84244 node-ajv_8.20.0~ds+~cs7.1.6-2.debian.tar.xz
Files:
 4acc4018c9b98451d1b62fb3f75da938 3019 javascript optional node-ajv_8.20.0~ds+~cs7.1.6-2.dsc
 4f99f39b746ebe95d1e8ffda9c6b7888 84244 javascript optional node-ajv_8.20.0~ds+~cs7.1.6-2.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEAN/li4tVV3nRAF7J9tdMp8mZ7ukFAmrD7xsACgkQ9tdMp8mZ
7umP6w//Vn3BQalvMtqX6dv74YnGeyMttnnX4RvUaOOx2qcd+Pv0zcD+VWL5QnY6
9zfxE6lpWZecgL7pSgj+vYORv78sg9mMGiYETRTplsRKexgYcp6oQY0dH//0jYdo
VsI+uY80im6OzZBgt6Levk1kk83dF+A5X6HJGgZzX5oap2ddEzcbvREYYn6l79mt
JR7u0GXrmSoIwRdtHgGiI61EjDO6d3flt4wUCLBrYV3WSlyd2nmL+34VLjNRnBO7
nrpWDb7D+Cl/ttU5h+f3TJoXpNHvlnvWmks9gcRQrFrUfB3ctgSpfmdGywUks0EJ
Zn+pRRKiZ+c4Gd7I+g6h0//i9jqncbbjfWg2bPUPPnGa3y6G50lifu/cLJN6y2We
ILh5ZgJ7gaUwevpOymSh6xNM9JPR9T+8XMQW3cU4MxiqwoQdhGJu30lgSwpoDQuJ
AM1FHiXcl/5rV0bHpdIhR44QTzfi1bHmmkQcNOq2hu894L7h2n659wF3kTrNqiJM
FqklABo+gQzLSR868aNMGjuJoVVAvgCfNX9opn4a9D1UscO+oKFvoP12gRxRUZL9
vzss9sciU2VRHxaz6aHucFaq9P+kEu6mKvzC/LgvArpZBLENkLBh2/eJu/IOPcSP
UltJibs2DNXHn8fm1r3ej6rBGdvk3U1ZH+ZyDKvASsa4GazWLQM=
=xH5S
-----END PGP SIGNATURE-----