[Pkg-javascript-devel] Bug#1009568: node-proper-lockfile: FTBFS: dh_auto_test: error: /bin/sh -ex debian/tests/pkg-js/test returned exit code 1

Lucas Nussbaum lucas at debian.org
Tue Apr 12 20:22:23 BST 2022


Source: node-proper-lockfile
Version: 4.1.2-1
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20220412 ftbfs-bookworm

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
>  debian/rules binary
> dh binary
>    dh_update_autotools_config
>    dh_autoreconf
>    dh_auto_configure --buildsystem=nodejs
>    dh_auto_build --buildsystem=nodejs
> No build command found, searching known files
>    dh_auto_test --buildsystem=nodejs
> 	mkdir -p node_modules/\@segment
> 	ln -s ../../debian/tests/test_modules/\@segment/clear-timeouts node_modules/\@segment/clear-timeouts
> 	ln -s ../debian/tests/test_modules/delay node_modules/delay
> 	ln -s ../debian/tests/test_modules/p-defer node_modules/p-defer
> 	ln -s ../debian/tests/test_modules/stable node_modules/stable
> 	ln -s ../debian/tests/test_modules/thread-sleep node_modules/thread-sleep
> 	ln -s ../. node_modules/proper-lockfile
> 	/bin/sh -ex debian/tests/pkg-js/test
> + jest --env node --ci -i
> FAIL test/lock.test.js
>   ● Test suite failed to run
> 
>     Jest encountered an unexpected token
> 
>     Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
> 
>     Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
> 
>     By default "node_modules" folder is ignored by transformers.
> 
>     Here's what you can do:
>      • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
>      • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
>      • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
>      • If you need a custom transformation specify a "transform" option in your config.
>      • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
> 
>     You'll find more details and examples of these config options in the docs:
>     https://jestjs.io/docs/configuration
>     For information about custom transformations, see:
>     https://jestjs.io/docs/code-transformation
> 
>     Details:
> 
>     /usr/share/nodejs/path-key/index.js:1
>     ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export default function pathKey(options = {}) {
>                                                                                       ^^^^^^
> 
>     SyntaxError: Unexpected token 'export'
> 
>       1372 |     try {
>       1373 |       const scriptFilename = this._resolver.isCoreModule(filename) ? `jest-nodejs-core-${filename}` : filename;
>     > 1374 |       return new (_vm().Script)(this.wrapCodeInModuleWrapper(scriptSource), {
>            |              ^
>       1375 |         displayErrors: true,
>       1376 |         filename: scriptFilename,
>       1377 |         // @ts-expect-error: Experimental ESM API
> 
>       at Runtime.createScriptFromCode (../../../usr/share/nodejs/jest-runtime/build/index.js:1374:14)
>       at Object.<anonymous> (../../../usr/share/nodejs/execa/execa.cjs:8:17)
> 
> PASS test/unlock.test.js (14.822 s)
> PASS test/check.test.js
> PASS test/sync.test.js
> FAIL test/misc.test.js
>   ● Test suite failed to run
> 
>     Jest encountered an unexpected token
> 
>     Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
> 
>     Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
> 
>     By default "node_modules" folder is ignored by transformers.
> 
>     Here's what you can do:
>      • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
>      • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
>      • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
>      • If you need a custom transformation specify a "transform" option in your config.
>      • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
> 
>     You'll find more details and examples of these config options in the docs:
>     https://jestjs.io/docs/configuration
>     For information about custom transformations, see:
>     https://jestjs.io/docs/code-transformation
> 
>     Details:
> 
>     /usr/share/nodejs/path-key/index.js:1
>     ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export default function pathKey(options = {}) {
>                                                                                       ^^^^^^
> 
>     SyntaxError: Unexpected token 'export'
> 
>       1372 |     try {
>       1373 |       const scriptFilename = this._resolver.isCoreModule(filename) ? `jest-nodejs-core-${filename}` : filename;
>     > 1374 |       return new (_vm().Script)(this.wrapCodeInModuleWrapper(scriptSource), {
>            |              ^
>       1375 |         displayErrors: true,
>       1376 |         filename: scriptFilename,
>       1377 |         // @ts-expect-error: Experimental ESM API
> 
>       at Runtime.createScriptFromCode (../../../usr/share/nodejs/jest-runtime/build/index.js:1374:14)
>       at Object.<anonymous> (../../../usr/share/nodejs/execa/execa.cjs:8:17)
> 
> PASS test/release.test.js
> 
> Test Suites: 2 failed, 4 passed, 6 total
> Tests:       37 passed, 37 total
> Snapshots:   0 total
> Time:        21.297 s
> Ran all test suites.
> dh_auto_test: error: /bin/sh -ex debian/tests/pkg-js/test returned exit code 1


The full build log is available from:
http://qa-logs.debian.net/2022/04/12/node-proper-lockfile_4.1.2-1_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20220412;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20220412&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.



More information about the Pkg-javascript-devel mailing list