[Pkg-javascript-devel] Bug#1101242: node-immutable-tuple: FTBFS: Exception during run: ReferenceError: require is not defined in ES module scope, you can use import instead
Santiago Vila
sanvila at debian.org
Tue Mar 25 00:11:17 GMT 2025
Package: src:node-immutable-tuple
Version: 0.4.10-11
Severity: serious
Tags: ftbfs trixie sid
Dear maintainer:
During a rebuild of all packages in unstable, your package failed to build:
--------------------------------------------------------------------------------
[...]
debian/rules clean
dh clean
dh_auto_clean --buildsystem=nodejs
rm -rf ./node_modules/.cache ./.nyc_output
rm ./node_modules/.cache
rm ./node_modules/.cache
dh_clean
debian/rules binary
dh binary
dh_update_autotools_config
dh_autoreconf
dh_auto_configure --buildsystem=nodejs
debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
./scripts/build.sh
[1m[33m(!) You have passed an unrecognized option[39m[22m
Unknown input options: sourcemap. Allowed options: acorn, acornInjectPlugins, cache, context, experimentalCacheExpiry, experimentalLogSideEffects, external, inlineDynamicImports, input, logLevel, makeAbsoluteExternalsRelative, manualChunks, maxParallelFileOps, maxParallelFileReads, moduleContext, onLog, onwarn, perf, plugins, preserveEntrySignatures, preserveModules, preserveSymlinks, shimMissingExports, strictDeprecations, treeshake, watch
[36m
[1m/<<PKGBUILDDIR>>/src/tuple.js[22m â [1m../dist/tuple.js[22m...[39m
[32mcreated [1m../dist/tuple.js[22m in [1m82ms[22m[39m
[1m[33m(!) You have passed an unrecognized option[39m[22m
Unknown input options: sourcemap. Allowed options: acorn, acornInjectPlugins, cache, context, experimentalCacheExpiry, experimentalLogSideEffects, external, inlineDynamicImports, input, logLevel, makeAbsoluteExternalsRelative, manualChunks, maxParallelFileOps, maxParallelFileReads, moduleContext, onLog, onwarn, perf, plugins, preserveEntrySignatures, preserveModules, preserveSymlinks, shimMissingExports, strictDeprecations, treeshake, watch
[36m
[1m/<<PKGBUILDDIR>>/src/tuple.js[22m â [1m../dist/tuple.mjs[22m...[39m
[32mcreated [1m../dist/tuple.mjs[22m in [1m80ms[22m[39m
uglifyjs dist/tuple.js -o dist/tuple.min.js
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_test --buildsystem=nodejs
mkdir -p node_modules
ln -s ../debian/tests/test_modules/reify node_modules/reify
ln -s ../. node_modules/immutable-tuple
/bin/sh -ex debian/tests/pkg-js/test
+ set -e
+ rm -rf node_modules
+ cp -a debian/tests/test_modules node_modules
+ mocha --require ./node_modules/reify --full-trace --reporter spec test/tests.js
Since Acorn 8.0.0, options.ecmaVersion is required.
Defaulting to 2020, but this will stop working in the future.
(node:84379) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///<<PKGBUILDDIR>>/test/tests.js is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to /<<PKGBUILDDIR>>/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
[Object: null prototype] { parse: undefined, sourceType: undefined }
Exception during run: ReferenceError: require is not defined in ES module scope, you can use import instead
at Suite.<anonymous> (file:///<<PKGBUILDDIR>>/test/tests.js:211:5)
at Object.create (/usr/share/nodejs/mocha/lib/interfaces/common.js:148:19)
at context.describe.context.context (/usr/share/nodejs/mocha/lib/interfaces/bdd.js:42:27)
at file:///<<PKGBUILDDIR>>/test/tests.js:65:1
at ModuleJob.run (node:internal/modules/esm/module_job:263:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:540:24)
at async formattedImport (/usr/share/nodejs/mocha/lib/nodejs/esm-utils.js:9:14)
at async exports.requireOrImport (/usr/share/nodejs/mocha/lib/nodejs/esm-utils.js:42:28)
at async exports.loadFilesAsync (/usr/share/nodejs/mocha/lib/nodejs/esm-utils.js:100:20)
at async singleRun (/usr/share/nodejs/mocha/lib/cli/run-helpers.js:162:3)
at async exports.handler (/usr/share/nodejs/mocha/lib/cli/run.js:375:5)
dh_auto_test: error: /bin/sh -ex debian/tests/pkg-js/test returned exit code 1
make: *** [debian/rules:8: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:
https://people.debian.org/~sanvila/build-logs/202503/
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 could not 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-immutable-tuple, so that this is still
visible in the BTS web page for this package.
Thanks.
More information about the Pkg-javascript-devel
mailing list