Quoting Nilesh Patra (2022-02-28 19:21:07) > On 2/28/22 3:01 PM, Jonas Smedegaard wrote: > > Currently, autopkgtest fails for node-eslint-visitor-keys and I cannot > > figure out why. > > > > I would be happy if others could have a look and maybe help spot why it > > fails. > > [...] > > > Error: Cannot find module > > '/tmp/autopkgtest-lxc.w0404gv_/downtmp/build.H9q/src/dist/eslint-visitor-keys.cjs' > > at createEsmNotFoundErr (internal/modules/cjs/loader.js:842:15) > > at finalizeEsmResolution (internal/modules/cjs/loader.js:835:15) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > As you might have noticed above, it tries to find dist/<something> in > the local autopkgtest directory instead of global one (/usr/share/) > > This happens because you are running the test in the same directory > where your source code is and the "local" package.json is interfering > with your "require" command. > > Simple solution is to create a temporary dir; or use $AUTOPKGTEST_TMP > (latter is best) > > I have attached a patch that fixes this, please apply and upload. > > Hope that helps.
Thanks, very helpful. Do you happen to know where this behaviour is documented upstream? I ask because I experience another possibly similar error with failure locating chai for node-eslint-visitor-keys 3.3.0+~0.0.51, where it is not an option to switch directory. > > The package does _not_ use pkg-js-tools. > > Had you used this, it'd have passed since it does the change to temp > dir thing by default That's good to know, for packages using pkg-js-tools. > > Works fine interactively in a local pristine chroot with only nodejs > > and node-eslint-visitor-keys installed. > > I hope you run the autopkgtest in a schroot/container and were able to > reproduce it? Not sure what you mean to say here. I use a pbuilder chroot, and as I wrote I was unable to reproduce it - thanks to your explanation I now know why: interactive access and scripted access are not same environment with pbuilder. - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private
signature.asc
Description: signature
-- Pkg-javascript-devel mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
