[Pkg-javascript-devel] Bug#935585: node-d3-scale breaks node-d3 autopkgtest: SyntaxError: Unexpected token export

Pirate Praveen praveen at onenetbeyond.org
Sat Aug 24 15:58:23 BST 2019


Control: block -1 by 930920

On Sat, 24 Aug 2019 11:29:57 +0200 Paul Gevers <elbrus at debian.org> wrote:
> autopkgtest [18:11:04]: test require: [-----------------------
> /usr/lib/nodejs/d3/node_modules/d3-scale/index.js:1
> (function (exports, require, module, __filename, __dirname) { export {
>                                                               ^^^^^^
> 
> SyntaxError: Unexpected token export
>     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)
> autopkgtest [18:11:05]: test require: -----------------------]
> 

I think the root cause is broken d3-format.js in node_modules

/usr/share/nodejs/d3$ ls node_modules/d3-format/d3-format.js -l
lrwxrwxrwx 1 root root 51 Aug 23 08:32
node_modules/d3-format/d3-format.js ->
../../../../share/javascript/d3-format/d3-format.js

Root cause is #930920 which forces me to embed d3-format and d3-scale in
the first place by adding lots of hacks.



More information about the Pkg-javascript-devel mailing list