Control: tag -1 help On Sat, 08 Jun 2019 20:48:32 +0500 Pirate Praveen <prav...@onenetbeyond.org> wrote:> This library is a dependency of gitlab. Since it uses babel and webpack > to generate ES5 code, it is not suitable for embedding.
With node-d3 in NEW/salsa (#801765), I get this error. d3-format and d3-scale is embedded in node-d3 and installed in /usr/lib/nodejs/d3/node_modules. Because of missing ES modules in node-d3-format (#930920) we cannot use the packaged version. ERROR in /usr/lib/nodejs/d3/index.js Module not found: Error: Can't resolve 'd3-format' in '/usr/lib/nodejs/d3' @ /usr/lib/nodejs/d3/index.js 13:0-26 @ ./lib/render.js @ ./index.js ERROR in /usr/lib/nodejs/d3/index.js Module not found: Error: Can't resolve 'd3-scale' in '/usr/lib/nodejs/d3' @ /usr/lib/nodejs/d3/index.js 23:0-25 @ ./lib/render.js @ ./index.js I tried this patch (also tried /usr/lib/nodejs/d3/node_modules instead of just node_modules), but webpack still fails. Upstream used webpack 4, we have webpack 3.5.6, but that should not be an issue for resolving I think. $ cat debian/patches/use-modules-embedded-in-d3.patch --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -15,7 +15,7 @@ }, resolve: { - modules: ['/usr/lib/nodejs'], + modules: ['/usr/lib/nodejs', 'node_modules'], }, resolveLoader: { The easiest fix would be updating node-d3-format, but it is not team maintained any more (result of an accidental hijack from me). Other option would be to fix webpack configuration. Hope someone can help here.
signature.asc
Description: OpenPGP digital signature