[Pkg-javascript-devel] Bug#988507: Bug#988507: Bug#988507: Bug#988507: update node-terser to alteast version 4.8

Yadd yadd at debian.org
Sat May 15 04:13:25 BST 2021


Le 15/05/2021 à 05:02, Yadd a écrit :
> Le 14/05/2021 à 14:21, Jonas Smedegaard a écrit :
>> Quoting Pirate Praveen (2021-05-14 13:46:28)
>>> terser-webpack-plugin needs terser at least version 4.8. Is there any 
>>> known blockers I can help with?
>>
>> Thanks for asking.
>>
>> Draft package in git fails like this:
>>
>> cd dist && ../bin/terser \
>>         --mangle --compress \
>>         --source-map 'content=bundle.js.map,includeSources=true' \
>>         --output bundle.min.js \
>>         -- bundle.js
>> Parse error at undefined:undefined,undefined
>>
>> /build/node-terser-4.8.0/bin/terser:244
>>             var lines = files[ex.filename].split(/\r?\n/);
>>                                            ^
>> TypeError: Cannot read property 'split' of undefined
>>     at run (/build/node-terser-4.8.0/bin/terser:244:44)
>>     at Object.<anonymous> (/build/node-terser-4.8.0/bin/terser:188:5)
>>     at Module._compile (internal/modules/cjs/loader.js:999:30)
>>     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
>>     at Module.load (internal/modules/cjs/loader.js:863:32)
>>     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
>>     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
>>     at internal/main/run_main_module.js:17:47
>>
>> /build/node-terser-4.8.0/tools/exit.js:14
>>     throw exit;
>>     ^
>> [Function: exit]
>>
>>
>> I suspect it is related to patch 1001 to use commander 4 - would sure be 
>> helpful to have a pair of fresh eyes on it.
> 
> Hi,
> 
> same error with and without 1001 patch

I tried this and get the same error:

  $ cd /tmp
  $ npm i terser at 4.8.0
  $ cd -
  $ cd dist && /tmp/node_modules/terser/bin/terser \
         --mangle --compress \
         --source-map 'content=bundle.js.map,includeSources=true' \
         --output bundle.min.js \
         -- bundle.js

Looking more, error seems to be in `rollup --no-esModule -c`: the
produced files looks strange (a mix of js and map)



More information about the Pkg-javascript-devel mailing list