Bug#930223: [Pkg-javascript-devel] need help with building node-dagre-d3-renderer with webpack

2019-06-27 Thread Pirate Praveen



Control: tag -1 -help

On Wed, 26 Jun, 2019 at 12:31 PM, Pirate Praveen 
 wrote:
I need to install ES modules of node-lodash for umd generation 
(dagre-d3-renderer is importing from lodash).


After building node-lodash-es from node-lodash, I hit a dead end with 
node-graphlibrary as it did not provide an ES module format. So I had 
to use rollup-plugin-commonjs to finally build it successfully.




Bug#930223: [Pkg-javascript-devel] need help with building node-dagre-d3-renderer with webpack

2019-06-26 Thread Pirate Praveen



On 2019, ജൂൺ 25 5:08:43 PM IST, Pirate Praveen  wrote:
>
>
>On Tue, 25 Jun, 2019 at 3:13 PM, Pirate Praveen 
> wrote:
>> Same error when changing package.json#main to dist/dagre-d3.js (umd 
>> format).
>
>To confirm it is not a browser only library, I downloaded the 
>dagre-d3-renderer dist.tarball from npmjs.com and the require command 
>succeeds there.

I switched build from webpack to rollup and now require is passing.

I need to install ES modules of node-lodash for umd generation 
(dagre-d3-renderer is importing from lodash).
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Bug#930223: [Pkg-javascript-devel] need help with building node-dagre-d3-renderer with webpack

2019-06-25 Thread Pirate Praveen




On Tue, 25 Jun, 2019 at 3:13 PM, Pirate Praveen 
 wrote:
Same error when changing package.json#main to dist/dagre-d3.js (umd 
format).


To confirm it is not a browser only library, I downloaded the 
dagre-d3-renderer dist.tarball from npmjs.com and the require command 
succeeds there.




Bug#930223: [Pkg-javascript-devel] need help with building node-dagre-d3-renderer with webpack

2019-06-25 Thread Pirate Praveen




On Tue, 25 Jun, 2019 at 3:07 PM, Pirate Praveen 
 wrote:
Now there is another error (tried replacing commonjs2 with commonjs, 
also tried with nodejs 12),


  dh_auto_test --buildsystem=nodejs
/usr/bin/node -e require\(\".\"\)
/<>/dist/dagre-d3.core.js:950
function (node, name, id, index, group, timing) {
^

SyntaxError: Unexpected token (
   at new Script (vm.js:79:7)
   at createScript (vm.js:251:10)
   at Object.runInThisContext (vm.js:303:10)
   at Module._compile (internal/modules/cjs/loader.js:657:28)
   at Object.Module._extensions..js 
(internal/modules/cjs/loader.js:700:10)

   at Module.load (internal/modules/cjs/loader.js:599:32)
   at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
   at Function.Module._load (internal/modules/cjs/loader.js:530:3)
   at Module.require (internal/modules/cjs/loader.js:637:17)
   at require (internal/modules/cjs/helpers.js:22:18)
dh_auto_test: /usr/bin/node -e require\(\".\"\) returned exit code 1


Same error when changing package.json#main to dist/dagre-d3.js (umd 
format).




Bug#930223: [Pkg-javascript-devel] need help with building node-dagre-d3-renderer with webpack

2019-06-25 Thread Pirate Praveen



Control: tag -1 help

On Tue, 25 Jun, 2019 at 1:49 PM, Pirate Praveen 
 wrote:
While looking for something else in package.json, I realized, there 
was a line excluding node_modules and there was two places I needed 
to update. With the following patch, webpack is successful.


Now there is another error (tried replacing commonjs2 with commonjs, 
also tried with nodejs 12),


  dh_auto_test --buildsystem=nodejs
/usr/bin/node -e require\(\".\"\)
/<>/dist/dagre-d3.core.js:950
function (node, name, id, index, group, timing) {
^

SyntaxError: Unexpected token (
   at new Script (vm.js:79:7)
   at createScript (vm.js:251:10)
   at Object.runInThisContext (vm.js:303:10)
   at Module._compile (internal/modules/cjs/loader.js:657:28)
   at Object.Module._extensions..js 
(internal/modules/cjs/loader.js:700:10)

   at Module.load (internal/modules/cjs/loader.js:599:32)
   at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
   at Function.Module._load (internal/modules/cjs/loader.js:530:3)
   at Module.require (internal/modules/cjs/loader.js:637:17)
   at require (internal/modules/cjs/helpers.js:22:18)
dh_auto_test: /usr/bin/node -e require\(\".\"\) returned exit code 1