[Pkg-javascript-devel] Bug#997591: node-mini-css-extract-plugin: FTBFS: dh_auto_test: error: /bin/sh -ex debian/tests/pkg-js/test returned exit code 1

Lucas Nussbaum lucas at debian.org
Sat Oct 23 22:06:18 BST 2021


Source: node-mini-css-extract-plugin
Version: 1.3.3-1
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20211023 ftbfs-bookworm

Hi,

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


Relevant part (hopefully):
> dpkg-buildpackage
> -----------------
> 
> Command: dpkg-buildpackage -us -uc -sa -rfakeroot
> dpkg-buildpackage: info: source package node-mini-css-extract-plugin
> dpkg-buildpackage: info: source version 1.3.3-1
> dpkg-buildpackage: info: source distribution unstable
> dpkg-buildpackage: info: source changed by Xavier Guimard <yadd at debian.org>
>  dpkg-source --before-build .
> dpkg-buildpackage: info: host architecture amd64
>  debian/rules clean
> dh clean
>    dh_auto_clean --buildsystem=nodejs
> 	rm -rf ./node_modules/.cache
>    dh_clean
>  dpkg-source -b .
> dpkg-source: info: using source format '3.0 (quilt)'
> dpkg-source: info: building node-mini-css-extract-plugin using existing ./node-mini-css-extract-plugin_1.3.3.orig.tar.gz
> dpkg-source: info: building node-mini-css-extract-plugin in node-mini-css-extract-plugin_1.3.3-1.debian.tar.xz
> dpkg-source: info: building node-mini-css-extract-plugin in node-mini-css-extract-plugin_1.3.3-1.dsc
>  debian/rules binary
> dh binary
>    dh_update_autotools_config
>    dh_autoreconf
>    dh_auto_configure --buildsystem=nodejs
>    dh_auto_build --buildsystem=nodejs
> Found debian/nodejs/./build
> 	cd ./. && sh -ex debian/nodejs/./build
> + NODE_ENV=production babeljs src -d dist --ignore src/**/*.test.js --copy-files
> Successfully compiled 11 files with Babel (809ms).
>    dh_auto_test --buildsystem=nodejs
> 	mkdir -p node_modules
> 	ln -s ../. node_modules/mini-css-extract-plugin
> 	/bin/sh -ex debian/tests/pkg-js/test
> + jest --ci -u test/HMR.test.js test/validate-plugin-options.test.js test/normalize-url.test.js test/cjs.test.js test/TestCache.test.js
> FAIL test/HMR.test.js
>   ● HMR › should works
> 
>     The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
>     Consider using the "jsdom" test environment.
> 
>     ReferenceError: document is not defined
> 
>       28 |     jest.spyOn(Date, 'now').mockImplementation(() => 1479427200000);
>       29 | 
>     > 30 |     document.head.innerHTML = '<link rel="stylesheet" href="/dist/main.css" />';
>          |     ^
>       31 |     document.body.innerHTML = '<script src="/dist/main.js"></script>';
>       32 |   });
>       33 | 
> 
>       at Object.<anonymous> (test/HMR.test.js:30:5)
> 
>   ● HMR › should works with multiple updates
> 
>     The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
>     Consider using the "jsdom" test environment.
> 
>     ReferenceError: document is not defined
> 
>       28 |     jest.spyOn(Date, 'now').mockImplementation(() => 1479427200000);
>       29 | 
>     > 30 |     document.head.innerHTML = '<link rel="stylesheet" href="/dist/main.css" />';
>          |     ^
>       31 |     document.body.innerHTML = '<script src="/dist/main.js"></script>';
>       32 |   });
>       33 | 
> 
>       at Object.<anonymous> (test/HMR.test.js:30:5)
> 
>   ● HMR › should reloads with locals
> 
>     The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
>     Consider using the "jsdom" test environment.
> 
>     ReferenceError: document is not defined
> 
>       28 |     jest.spyOn(Date, 'now').mockImplementation(() => 1479427200000);
>       29 | 
>     > 30 |     document.head.innerHTML = '<link rel="stylesheet" href="/dist/main.css" />';
>          |     ^
>       31 |     document.body.innerHTML = '<script src="/dist/main.js"></script>';
>       32 |   });
>       33 | 
> 
>       at Object.<anonymous> (test/HMR.test.js:30:5)
> 
>   ● HMR › should work reload all css
> 
>     The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
>     Consider using the "jsdom" test environment.
> 
>     ReferenceError: document is not defined
> 
>       28 |     jest.spyOn(Date, 'now').mockImplementation(() => 1479427200000);
>       29 | 
>     > 30 |     document.head.innerHTML = '<link rel="stylesheet" href="/dist/main.css" />';
>          |     ^
>       31 |     document.body.innerHTML = '<script src="/dist/main.js"></script>';
>       32 |   });
>       33 | 
> 
>       at Object.<anonymous> (test/HMR.test.js:30:5)
> 
>   ● HMR › should reloads with non http/https link href
> 
>     The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
>     Consider using the "jsdom" test environment.
> 
>     ReferenceError: document is not defined
> 
>       28 |     jest.spyOn(Date, 'now').mockImplementation(() => 1479427200000);
>       29 | 
>     > 30 |     document.head.innerHTML = '<link rel="stylesheet" href="/dist/main.css" />';
>          |     ^
>       31 |     document.body.innerHTML = '<script src="/dist/main.js"></script>';
>       32 |   });
>       33 | 
> 
>       at Object.<anonymous> (test/HMR.test.js:30:5)
> 
>   ● HMR › should reloads with # link href
> 
>     The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
>     Consider using the "jsdom" test environment.
> 
>     ReferenceError: document is not defined
> 
>       28 |     jest.spyOn(Date, 'now').mockImplementation(() => 1479427200000);
>       29 | 
>     > 30 |     document.head.innerHTML = '<link rel="stylesheet" href="/dist/main.css" />';
>          |     ^
>       31 |     document.body.innerHTML = '<script src="/dist/main.js"></script>';
>       32 |   });
>       33 | 
> 
>       at Object.<anonymous> (test/HMR.test.js:30:5)
> 
>   ● HMR › should reloads with link without href
> 
>     The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
>     Consider using the "jsdom" test environment.
> 
>     ReferenceError: document is not defined
> 
>       28 |     jest.spyOn(Date, 'now').mockImplementation(() => 1479427200000);
>       29 | 
>     > 30 |     document.head.innerHTML = '<link rel="stylesheet" href="/dist/main.css" />';
>          |     ^
>       31 |     document.body.innerHTML = '<script src="/dist/main.js"></script>';
>       32 |   });
>       33 | 
> 
>       at Object.<anonymous> (test/HMR.test.js:30:5)
> 
>   ● HMR › should reloads with absolute remove url
> 
>     The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
>     Consider using the "jsdom" test environment.
> 
>     ReferenceError: document is not defined
> 
>       28 |     jest.spyOn(Date, 'now').mockImplementation(() => 1479427200000);
>       29 | 
>     > 30 |     document.head.innerHTML = '<link rel="stylesheet" href="/dist/main.css" />';
>          |     ^
>       31 |     document.body.innerHTML = '<script src="/dist/main.js"></script>';
>       32 |   });
>       33 | 
> 
>       at Object.<anonymous> (test/HMR.test.js:30:5)
> 
>   ● HMR › should reloads with non-file script in the end of page
> 
>     The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
>     Consider using the "jsdom" test environment.
> 
>     ReferenceError: document is not defined
> 
>       28 |     jest.spyOn(Date, 'now').mockImplementation(() => 1479427200000);
>       29 | 
>     > 30 |     document.head.innerHTML = '<link rel="stylesheet" href="/dist/main.css" />';
>          |     ^
>       31 |     document.body.innerHTML = '<script src="/dist/main.js"></script>';
>       32 |   });
>       33 | 
> 
>       at Object.<anonymous> (test/HMR.test.js:30:5)
> 
>   ● HMR › should handle error event
> 
>     The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string.
>     Consider using the "jsdom" test environment.
> 
>     ReferenceError: document is not defined
> 
>       28 |     jest.spyOn(Date, 'now').mockImplementation(() => 1479427200000);
>       29 | 
>     > 30 |     document.head.innerHTML = '<link rel="stylesheet" href="/dist/main.css" />';
>          |     ^
>       31 |     document.body.innerHTML = '<script src="/dist/main.js"></script>';
>       32 |   });
>       33 | 
> 
>       at Object.<anonymous> (test/HMR.test.js:30:5)
> 
> PASS test/normalize-url.test.js
> PASS test/cjs.test.js (10.547 s)
> PASS test/validate-plugin-options.test.js (11.687 s)
> PASS test/TestCache.test.js (12.804 s)
> 
> Test Suites: 1 failed, 4 passed, 5 total
> Tests:       10 failed, 74 passed, 84 total
> Snapshots:   19 passed, 19 total
> Time:        14.564 s
> Ran all test suites matching /test\/HMR.test.js|test\/validate-plugin-options.test.js|test\/normalize-url.test.js|test\/cjs.test.js|test\/TestCache.test.js/i.
> 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/2021/10/23/node-mini-css-extract-plugin_1.3.3-1_unstable.log

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