[Pkg-javascript-devel] Bug#977269: Bug#977269: node-rollup-plugin-terser seems incompatible with current node-terser

Xavier yadd at debian.org
Sun Dec 13 21:00:53 GMT 2020


Le 13/12/2020 à 20:53, Jonas Smedegaard a écrit :
> Control: severity 977269 important
> Control: tags 977269 +moreinfo +unreproducible
> 
> Quoting Jonas Smedegaard (2020-12-13 20:29:46)
>> Quoting Jonas Smedegaard (2020-12-13 17:22:05)
>>> Quoting Xavier Guimard (2020-12-13 13:19:47)
>>>> Package: node-rollup-plugin-terser
>>>> Version: 7.0.2-2
>>>> Severity: grave
>>>> Justification: renders package unusable
>>>>
>>>> When trying current rollup-plugin-terser (7.0.2)  with current
>>>> node-terser (4.1.2), package is unuseable:
>>>>
>>>> $ rollup -c
>>>>
>>>> index.js → dist/pako.js, dist/pako.min.js...
>>>> [!] (plugin terser) Error: Cannot find module '/home/xavier/dev/debian/src/pkg-js/packages/node-pako/node_modules/terser/dist/bundle.min.js'. Please verify that the package.json has a valid "main" entry
>>>
>>> Neither node-rollup-plugin-terser nor node-terser asks for files below 
>>> /home/xavier - please try locate which code did that.
>>
>> Something _is_ broken with node-rollup-plugin-terser - the provided 
>> error message is just not really helpful for me.
>>
>> I might have a fix for the error I located - we'll see if that turns out 
>> to also cure the issue you are experiencing, but for future sake please 
>> try unwrap any node_modules tricks when reporting bugs, as they hide 
>> ability to trace what is going on where (at least for me - I have no 
>> doubt that you are fluent in your tools).
> 
> If problem persist with node-rollup-plugin-terser 7.0.2-3 then please 
> try isolate a test causing the failure without node_modules wrapping.
> 
> Otherwise please close.
> 
>  - Jonas

Sorry, in my different tests, I didn't post the good logs. Here are the
relevant logs:

$ rollup -c

index.js → dist/pako.js, dist/pako.min.js...
    minify(...).then is not a function

[!] (plugin terser) TypeError: minify(...).then is not a function
TypeError: minify(...).then is not a function
    at Object.transform
(/usr/share/nodejs/rollup-plugin-terser/transform.js:5:32)
    at execFunction
(/usr/share/nodejs/jest-worker/build/workers/processChild.js:135:17)
    at execHelper
(/usr/share/nodejs/jest-worker/build/workers/processChild.js:117:5)
    at execMethod
(/usr/share/nodejs/jest-worker/build/workers/processChild.js:121:5)
    at process.messageListener
(/usr/share/nodejs/jest-worker/build/workers/processChild.js:46:7)
    at process.emit (events.js:314:20)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)

When replacing /usr/share/nodejs/terser by version 5 (as recommended in
rollup-plugin-terser package.json), everything works fine.

The rollup.config.js has nothing special
(https://github.com/nodeca/pako/blob/master/rollup.config.js)



More information about the Pkg-javascript-devel mailing list