openembedded/meta-openembedded

NodeJS includes runtime dependency from nodejs-npm package

Closed this issue · 1 comments

I'm using the nodejs recipe to run a JS file on a target device; I don't need npm and none of my recipes are referencing it. However, I'm getting npm and npx installed on the device due to the fact that the "nodejs" package depends on "nodejs-npm" (this can be found by looking at the control file in the created IPK package). How can that be? I'm not finding any explicit dependency between the two packages.

This was due to a dangling link installed in the nodejs package, linking to the /usr/bin/corepack file. Since it was dangling, yocto automatically tries to search for the target in other packages and add them to the depenency list if the target file is found. This seems to be fixed in more recent versions of the recipe, like in the nanbield branch, but not in kirkstone.