[Pkg-javascript-devel] Bug#1023874: node-readable-stream: FTBFS: Cannot use import statement outside a module

Andreas Beckmann anbe at debian.org
Fri Nov 11 19:54:30 GMT 2022


Source: node-readable-stream
Version: 4.1.0+~cs9.0.2-1
Severity: serious
Tags: ftbfs
Justification: fails to build from source

Hi,

node-readable-stream/experimental recently started to FTBFS, probably
because some build-dependency became more strict. The version in sid is
not affected.

...
   dh_auto_build --buildsystem=nodejs
Found debian/nodejs/abort-controller/build
        cd ./abort-controller && sh -ex ../debian/nodejs/abort-controller/build
+ rollup -c
(node:4756) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
ESC[1mESC[31m[!] ESC[1mRollupError: Node tried to load your configuration file as CommonJS even though it is likely an ES module. To resolve this, change the extension of your configuration to ".mjs", set "type": "module" in your package.json file or pass the "--bundleConfigAsCjs" flag.

Original error: Cannot use import statement outside a moduleESC[22mESC[1mESC[39mESC[22m
ESC[36mhttps://rollupjs.org/guide/en/#--bundleconfigascjsESC[39m
ESC[2m/build/node-readable-stream-4.1.0+~cs9.0.2/abort-controller/rollup.config.js:1
import babel from "@rollup/plugin-babel"
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:360:18)
    at wrapSafe (node:internal/modules/cjs/loader:1088:15)
    at Module._compile (node:internal/modules/cjs/loader:1123:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at ESMLoader.import (node:internal/modules/esm/loader:530:24)ESC[22m

dh_auto_build: error: cd ./abort-controller && sh -ex ../debian/nodejs/abort-controller/build returned exit code 1
make: *** [debian/rules:11: binary] Error 25
...

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: node-readable-stream_4.1.0+~cs9.0.2-1.log.gz
Type: application/gzip
Size: 26827 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20221111/6316e8d8/attachment.gz>


More information about the Pkg-javascript-devel mailing list