[Pkg-javascript-devel] Bug#973983: pkg-js-tools tries to require a non-existing name
Julien Puydt
julien.puydt at gmail.com
Sun Nov 8 15:02:45 GMT 2020
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.
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
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,
^
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