[Pkg-javascript-devel] Bug#973170: node-fetch has no default export
Xavier
yadd at debian.org
Wed Oct 28 08:13:23 GMT 2020
Control: retitle -1 node-fetch has no default export
Le 27/10/2020 à 21:47, Xavier a écrit :
> Control: reassign -1 node-fetch
> Control: affects -1 node-formidable
>
> Le 27/10/2020 à 18:07, Lucas Nussbaum a écrit :
>> Source: node-formidable
>> Version: 1.2.1+20200129git8231ea6-1
>> Severity: serious
>> Justification: FTBFS on amd64
>> Tags: bullseye sid ftbfs
>> Usertags: ftbfs-20201027 ftbfs-bullseye
>>
>> Hi,
>>
>> During a rebuild of all packages in sid, your package failed to build
>> on amd64.
>
> Test works fine using node-fetch installed using npm (same version but
> code differs).
Here is the bug:
*with node-fetch from npm registry*, this works:
$ node -e 'var f = require("node-fetch");
console.log("result",f("http://google.com"))'
result Promise { <pending> }
*with node-fetch from Debian* /(same version)/:
$ node -e 'var f = require("node-fetch");
console.log("result",f("http://google.com"))'
[eval]:1
var f = require("node-fetch");console.log("e",f("http://google.com"))
^
TypeError: f is not a function
*but this works*:
$ node -e 'var f = require("node-fetch");
console.log("result",f.default("http://google.com"))'
result Promise { <pending> }
So "default" is not default. There is problably a missing rollup plugin,
NB: node-fetch/package.json requires "rollup ^0.63.4"
More information about the Pkg-javascript-devel
mailing list