[Pkg-javascript-devel] Bug#1134301: node-react-toastify: FTBFS: Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)

Santiago Vila sanvila at debian.org
Sat Apr 18 18:32:17 BST 2026


Package: src:node-react-toastify
Version: 9.1.2+~1.2.1-4
Severity: serious
Tags: ftbfs forky sid

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/202604/

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-react-toastify, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean
   dh_auto_clean --buildsystem=nodejs
	rm -rf ./node_modules/.cache ./.nyc_output
	rm -rf clsx/node_modules/.cache clsx/.nyc_output
rm ./node_modules/.cache
unlink ./node_modules/tslib
unlink ./node_modules/@types/react
Trying to remove ./node_modules/@types
rm clsx/node_modules/.cache
rm ./node_modules/.cache
unlink ./node_modules/tslib
unlink ./node_modules/@types/react
Trying to remove ./node_modules/@types
unlink node_modules/clsx
   dh_clean
 debian/rules binary
dh binary
   dh_update_autotools_config
   dh_autoreconf
   dh_auto_configure --buildsystem=nodejs
Link ./node_modules/tslib -> /usr/share/nodejs/tslib
Link ./node_modules/@types/react -> /usr/share/nodejs/@types/react
Link node_modules/clsx -> ../clsx
   debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_build --buildsystem=nodejs
Found debian/nodejs/clsx/build
	cd ./clsx && sh -ex ../debian/nodejs/clsx/build
+ pkgjs-pjson . main
+ MAIN=dist/clsx.js
+ pkgjs-pjson . module
+ ES=dist/clsx.m.js
+ pkgjs-pjson . unpkg
+ UNPKG=dist/clsx.min.js
+ rollup -p @rollup/plugin-commonjs -o dist/cjs.js -f cjs src/index.js

src/index.js → dist/cjs.js...
(!) Mixing named and default exports
https://rollupjs.org/configuration-options/#output-exports
The following entry modules are using named and default exports together:
src/index.js

Consumers of your bundle will have to use chunk.default to access their default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
created dist/cjs.js in 35ms
+ grep -v ^export dist/cjs.js
+ echo module.exports = clsx;
+ echo module.exports.clsx = clsx;
+ rm -f dist/cjs.js
+ terser -o dist/clsx.min.js dist/clsx.js
+ cp src/index.js dist/clsx.m.js
rollup -p @rollup/plugin-babel -p rollup-plugin-typescript -p rollup-plugin-terser --external react,clsx -f es -o ./dist/react-toastify.esm.mjs src/index.ts

src/index.ts → ./dist/react-toastify.esm.mjs...
babelHelpers: 'bundled' option was used by default. It is recommended to configure this option explicitly, read more here: https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers
[!] RollupError: Unexpected token (Note that you need plugins to import files that are not JavaScript)
src/index.ts (10:7)
 8:   Zoom,
 9:   Icons,
10:   type IconProps,
           ^
11:   type CloseButtonProps
12: } from './components';
    at error (/usr/share/nodejs/rollup/dist/shared/rollup.js:321:30)
    at Module.error (/usr/share/nodejs/rollup/dist/shared/rollup.js:15310:16)
    at Module.tryParse (/usr/share/nodejs/rollup/dist/shared/rollup.js:16041:25)
    at Module.setSource (/usr/share/nodejs/rollup/dist/shared/rollup.js:15642:39)
    at ModuleLoader.addModuleSource (/usr/share/nodejs/rollup/dist/shared/rollup.js:26213:20)


make[1]: *** [debian/rules:18: override_dh_auto_build] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:14: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------



More information about the Pkg-javascript-devel mailing list