[BUG] Cannot set properties of null (setting 'peer') #6622
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 9.x
work is associated with a specific npm 9 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I am getting the error:
I've then checked
/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js:101:54)
and added aconsole.error({node});
to line 101, to get more insight. It seems liketarget
isnull
, I've put the last three nodes below.I've created a mwe here. To reproduce, execute
npm i
and then try to installnpm i measuresuite@latest
again. It works well for the first install and any subsequent install, iffnode_modules
are deleted beforehand.I am the maintainer of
measuresuite
, which is a C-library with a gyp file. The native code it build into./build/Release/measuresuite
which I am trying to reference frommeasuresuite-native-module
. c.f. package.json:47Possibly it is not an issue with npmcli (although it seems related like here), but with how I am packaging
measuresuite
, but I could not find any better documentation of how to package a native module. (and it used to work fine just like that).I'm more than happy to provide more information or data if needed, but I am lost and don't know where to debug / which data is needed.
Last three nodes:
Expected Behavior
That
npm i measuresuite@latest
does not fail.Steps To Reproduce
git clone https://github.com/dderjoel/mwe-measuresuite.git cd mwe-measuresuite npm i npm i measuresuite@latest
Environment
uname -a
: Linux arch4 6.3.9-arch1-1 archive: committable offline dependency archive #1 SMP PREEMPT_DYNAMIC Wed, 21 Jun 2023 20:46:20 +0000 x86_64 GNU/Linux)npm config ls
:npm config ls -l
:The text was updated successfully, but these errors were encountered: