The user, group, uid, gid, and unsafe-perms configurations are no longer relevant. When npm is run as root, scripts are always run with the effective uid and gid of the working directory owner.
The lowest version of npm currently supported is 8.6.0 (see above). The conclusion is that the problem no longer applies to any currently supported version of npm and therefore the problem description is obsolete.
Issue
README > Common problems > Cannot run post-install hook recommends using
npm install --unsafe-perm
.Background
Currently the minimum supported version of Node.js is
18.x
. The note relates tonpm
rather thanNode.js
itself.npm
is bundled inNode.js
.The lowest Node.js
18.x
version is Node.js 18.0.0 which bundles npm8.6.0
.The npm CHANGELOG 7.0.0 > All Lifecycle Scripts says:
The lowest version of npm currently supported is
8.6.0
(see above). The conclusion is that the problem no longer applies to any currently supported version ofnpm
and therefore the problem description is obsolete.Change
Remove the obsolete section README > Common problems > Cannot run post-install hook.