[Pkg-javascript-devel] Bug#1001554: Bug#1001554: node-mocha: FTBFS with webpack5: Error: wrong webpack5 options configuration

Pirate Praveen praveen at onenetbeyond.org
Mon May 23 11:05:43 BST 2022


Control: tags -1 patch

On Mon, 23 May 2022 14:34:29 +0530 Pirate Praveen 
<praveen at onenetbeyond.org> wrote:
 >
 >
 > On തി, മേയ് 23 2022 at 02:04:56 വൈകു +05:30:00
 > +05:30:00, Pirate Praveen <praveen at onenetbeyond.org> wrote:
 > > Control: severity -1 serious
 > >
 > >
 > > Since webpack 5 is in unstable, bumping severity.
 > >
 >
 > After dropping the patch for webpack 4 compatibility, the build now
 > fails with this error.
 >
 > It is not very clear from the log what is missing though.
 >
 > [08:40:30] Webpack errors:
 > [object Object]

Running webpack directly gave the following error,

(debian-sid)pravi at mahishi:~/forge/js-team/node-mocha/workerpool$ 
webpack --entry ./src/index.js -o /tmp/bundle.js --target es5
[webpack-cli] Error: For the selected environment is no default script 
chunk format available:
JSONP Array push can be chosen when 'document' or 'importScripts' is 
available.
CommonJs exports can be chosen when 'require' or node builtins are 
available.
Select an appropriate 'target' to allow selecting one by default, or 
specify the 'output.chunkFormat' directly.
    at /usr/share/nodejs/webpack/lib/config/defaults.js:735:11
    at F (/usr/share/nodejs/webpack/lib/config/defaults.js:72:15)
    at applyOutputDefaults 
(/usr/share/nodejs/webpack/lib/config/defaults.js:716:2)
    at applyWebpackOptionsDefaults 
(/usr/share/nodejs/webpack/lib/config/defaults.js:190:2)
    at createCompiler (/usr/share/nodejs/webpack/lib/webpack.js:77:2)
    at create (/usr/share/nodejs/webpack/lib/webpack.js:134:16)
    at webpack (/usr/share/nodejs/webpack/lib/webpack.js:142:47)
    at WebpackCLI.f [as webpack] 
(/usr/share/nodejs/webpack/lib/index.js:58:16)
    at WebpackCLI.createCompiler 
(/usr/share/nodejs/webpack-cli/lib/webpack-cli.js:2200:23)
    at async WebpackCLI.runWebpack 
(/usr/share/nodejs/webpack-cli/lib/webpack-cli.js:2330:16)

This merge request drops es5 from target and build passes 
https://salsa.debian.org/js-team/node-mocha/-/merge_requests/1 Can 
someone review this and see if it is okay to drop es5 target here?



More information about the Pkg-javascript-devel mailing list