You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
46 verbose stack TypeError: Cannot set properties of null (setting 'peer')
46 verbose stack at visit (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js:101:54)
46 verbose stack at visitNode (/usr/lib/node_modules/npm/node_modules/treeverse/lib/depth-descent.js:58:25)
46 verbose stack at next (/usr/lib/node_modules/npm/node_modules/treeverse/lib/depth-descent.js:44:19)
46 verbose stack at depth (/usr/lib/node_modules/npm/node_modules/treeverse/lib/depth-descent.js:83:10)
46 verbose stack at depth (/usr/lib/node_modules/npm/node_modules/treeverse/lib/depth.js:27:12)
46 verbose stack at unsetFlag (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js:96:5)
46 verbose stack at /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js:63:7
46 verbose stack at Map.forEach (<anonymous>)
46 verbose stack at calcDepFlagsStep (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js:41:17)
46 verbose stack at visit (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js:12:20)
I've then checked /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js:101:54) and added a console.error({node}); to line 101, to get more insight. It seems like target is null, I've put the last three nodes below.
I've created a mwe here. To reproduce, execute npm i and then try to install npm i measuresuite@latest again. It works well for the first install and any subsequent install, iff node_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 from measuresuite-native-module. c.f. package.json:47
Possibly 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.
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 liketargetisnull, I've put the last three nodes below.I've created a mwe here. To reproduce, execute
npm iand then try to installnpm i measuresuite@latestagain. It works well for the first install and any subsequent install, iffnode_modulesare 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/measuresuitewhich 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@latestdoes not fail.Steps To Reproduce
git clone https://github.com/dderjoel/mwe-measuresuite.git cd mwe-measuresuite npm i npm i measuresuite@latestEnvironment
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: