[Pkg-javascript-devel] Help with fixing jekyll (wrt src:node-webpack)

Pirate Praveen praveen at onenetbeyond.org
Sat Mar 14 11:23:17 GMT 2020



On Sat, Mar 14, 2020 at 11:50 am, Pirate Praveen <praveen at debian.org> 
wrote:
> 
> 
> On 2020, മാർച്ച് 14 7:32:59 AM IST, Daniel Leidert 
> <daniel.leidert at wgdd.de> wrote:
>> Hi there,
>> 
>> 
>> I reported the build issue against webpack and the bug was closed 
>> just
>> a few hours ago. Is this happening with the "fixed" webpack package?
> 
> This is a different bug, the bug you reported was for acorn 
> dependency version.
> 
>> 
>> Regards, Daniel
>> 
>> 
>> 
>> -------- Ursprüngliche Nachricht --------
>> Von: Utkarsh Gupta <utkarsh at debian.org>
>> Datum: Sa., 14. März 2020, 00:03
>> An: debian-ruby <debian-ruby at lists.debian.org>,
>> pkg-javascript-devel at alioth-lists.debian.net
>> Cc: Pirate Praveen <praveen at debian.org>, Daniel Leidert
>> <dleidert at debian.org>
>> Betreff: Help with fixing jekyll (wrt src:node-webpack)
>> 
>> Hi there,
>> 
>> Currently, Jekyll doesn't build. Here's why:
>> This commit[1] introduced using webpack. However this command:
>> 
>> ```
>> cd debian/node_modules/livereload-js; webpack --entry 
>> ./lib/startup.js
>> \
>>         --output
>> ../../../lib/jekyll/commands/serve/livereload_assets/livereload.js; 
>> cd
>> -
>> ```
>> 
>> fails to run with the following error:
>> 
>> ```
>> /usr/share/nodejs/webpack/node_modules/webpack-cli/bin/cli.js:281
>>                 throw err;
>>                 ^
>> 
>> Error: Cannot find module 'terser-webpack-plugin'
>> at Function.Module._resolveFilename
>> (internal/modules/cjs/loader.js:636:15)
>>     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
>>     at Module.require (internal/modules/cjs/loader.js:692:17)
>> at require
>> (/usr/share/nodejs/webpack/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
>>     at Object.apply
>> (/usr/share/nodejs/webpack/lib/WebpackOptionsDefaulter.js:302:27)
>>     at WebpackOptionsApply.process
>> (/usr/share/nodejs/webpack/lib/WebpackOptionsApply.js:467:16)
>>     at webpack (/usr/share/nodejs/webpack/lib/webpack.js:53:48)
>>     at processOptions
>> (/usr/share/nodejs/webpack/node_modules/webpack-cli/bin/cli.js:272:16)
>>     at yargs.parse
>> (/usr/share/nodejs/webpack/node_modules/webpack-cli/bin/cli.js:364:3)
>>     at Object.parse (/usr/share/nodejs/yargs/yargs.js:611:18)
>>   at 
>> /usr/share/nodejs/webpack/node_modules/webpack-cli/bin/cli.js:49:8
>>     at Object.<anonymous>
>> (/usr/share/nodejs/webpack/node_modules/webpack-cli/bin/cli.js:366:3)
>>     at Module._compile (internal/modules/cjs/loader.js:778:30)
>> at Object.Module._extensions..js
>> (internal/modules/cjs/loader.js:789:10)
>>     at Module.load (internal/modules/cjs/loader.js:653:32)
>>     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
>>     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
>>     at Module.require (internal/modules/cjs/loader.js:692:17)
>>     at require (internal/modules/cjs/helpers.js:25:18)
>>  at Object.<anonymous> 
>> (/usr/share/nodejs/webpack/bin/webpack.js:156:2)
>>     at Module._compile (internal/modules/cjs/loader.js:778:30)
>> at Object.Module._extensions..js
>> (internal/modules/cjs/loader.js:789:10)
>>     at Module.load (internal/modules/cjs/loader.js:653:32)
>>     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
>>     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
>>     at Function.Module.runMain 
>> (internal/modules/cjs/loader.js:831:12)
>>     at startup (internal/bootstrap/node.js:283:19)
>>     at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
>> ```
>> 
>> This maps to src:node-webpack. Whilst package.json (of node-webpack)
>> says to have a dependency on terser-webpack-plugin, however, it isn't
>> packaged and nor embedded. In fact, there's no mention of
>> terser-webpack-plugin at all.
>> This creates a problem with Jekyll (as shown above). I am not sure
>> what's the best way forward now? Is to embed terser-webpack-plugin
>> (with it's other dependencies packaged or embedded)? Or to embed
>> livereload-js into jekyll? Or what?
>> 
>> In any case, this is a bug with src:node-webpack which would be good
>> to have fixed.
> 
> Yes, this is a bug in webpack. As a work around try if --mode 
> development to webpack command works. In production mode it minifies 
> by default.
> 
> For actual fix terser-webpack-plugin needs packaging (someone is 
> working on it already). It will have to clear new. In the short term, 
> we can patch webpack to use uglifyjs-webpack-plugin which is already 
> patched to use terser.

I have patched webpack to use uglifyjs-webpack-plugin till 
terser-webpack-plugin is availabel in the archive. I confirmed jekyll 
is building fine, I'll upload it soon.





More information about the Pkg-javascript-devel mailing list