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

Utkarsh Gupta utkarsh at debian.org
Fri Mar 13 23:02:24 GMT 2020


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.


Best,
Utkarsh
---
[1]: https://salsa.debian.org/ruby-team/jekyll/-/commit/737def7c142fa252183bef6fa421dbb144f45351



More information about the Pkg-javascript-devel mailing list