[Pkg-javascript-devel] Bug#973983: Bug#973983: pkg-js-tools tries to require a non-existing name

Xavier yadd at debian.org
Sun Nov 8 15:25:22 GMT 2020


Le 08/11/2020 à 16:02, Julien Puydt a écrit :
> Package: pkg-js-tools
> Version: 0.9.45
> 
> I'm trying to package lumino (ITP 972487), which has a pretty special
> structure:
> - no main module ;
> - only packages.

Hi,

did you try to set onne of them in debian/nodejs/main ?

> My d/control has a build dep on pkg-js-tools, and uses "Provides:
> ${nodejs:Provides}" ; I have a d/nodejs/additional_components with
> packages/* to find the packages and my d/tests/pkg-js/test is only an
> "echo FIXME".
> 
> When building the package, I get strange warnings, but they seem pretty
> harmless :
> 
> dh_auto_install: warning: # /! "types" field should be replaced by
> "typings" in packages/algorithm/package.json
> Please report this bug

@praveen asked for this warning

> Things get bad when autopkgtest kicks in and tries to require:
> 
> autopkgtest [15:44:43]: test pkg-js-autopkgtest-require: [-------------
> ----------
> Using package.json
> Node module name is 
> Test: require
> internal/modules/cjs/loader.js:898
>     throw new ERR_INVALID_ARG_VALUE('id', id,
>     ^

debian/nodejs/main will fix that

> TypeError [ERR_INVALID_ARG_VALUE]: The argument 'id' must be a non-
> empty string. Received ''
>     at Module.require (internal/modules/cjs/loader.js:898:11)
>     at require (internal/modules/cjs/helpers.js:74:18)
>     at [eval]:1:1
>     at Script.runInThisContext (vm.js:120:18)
>     at Object.runInThisContext (vm.js:309:38)
>     at Object.<anonymous> ([eval]-wrapper:10:26)
>     at Module._compile (internal/modules/cjs/loader.js:1015:30)
>     at evalScript (internal/process/execution.js:94:25)
>     at internal/main/eval_string.js:23:3 {
>   code: 'ERR_INVALID_ARG_VALUE'
> }
> 
> indeed, the main package.json has no 'name' field. It should instead
> try to require the packages listed in d/nodejs/additional_components.
> 
> Is it possible to get around it?
> 
> Cheers,
> 
> JP
> 



More information about the Pkg-javascript-devel mailing list