[Pkg-javascript-devel] need help with building node-dagre-d3-renderer with webpack
Pirate Praveen
praveen at onenetbeyond.org
Tue Jun 25 08:52:49 BST 2019
Control: tag -1 help
On Sat, 08 Jun 2019 20:48:32 +0500 Pirate Praveen
<praveen at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20190625/0a8da35f/attachment.sig>
More information about the Pkg-javascript-devel
mailing list