[arch-general] "npm" package issues

Greg Minshall minshall at umich.edu
Wed Nov 4 07:56:33 UTC 2020


hi.  [hope all are well, etc.]

i use the npm package (for managing javascript packages).

today i tried "pacman -Syu", and i got a number of errors about files
under /usr/lib/node_modules/npm/node_modules that "exists in
filesystem":
----
(182/182) checking for file conflicts
error: failed to commit transaction (conflicting files)
npm: /usr/lib/node_modules/npm/node_modules/meant/.github/workflows/ci.yml exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/minimist/.travis.yml exists in filesystem
... (about minimist)
----

these are files that are not owned by the npm package.  the relevant
find command

: find /usr/lib/node_modules/npm/node_modules/ -exec pacman -Qo {} \; |
:    grep -v 'is owned by npm 6.14.8-1'

shows two files in some sort of ./.bin/ directory
----
error: No package owns /usr/lib/node_modules/npm/node_modules/.bin/node-gyp
error: No package owns /usr/lib/node_modules/npm/node_modules/.bin/semver
----

and then a number in a small number of npm packages, namely in
- meant (the .github subdirectory)
- minimist (the whole directory, i think)
- node-gyp (the whole directory)
- semver (the whole directory)
that are also in the "No package owns" state.

note that [pacman -Syu] only complains about meant and minimist, not
node-gyp or semver.

first off, i wonder if anyone has ideas of how i ended up in this
situation?  i know that occasionally npm will exclaim, with enthusiasm,
that a new, updated version, is available, and offer me a chance to
update it.  normally i don't run as root.  but, if i had, in the past,
sudo'd npm, and let it update itself, might *that* have produced this?

then, second, i'm ignorant enough to not be sure what to do and am
looking for advice.  i can do [pacman --overwrite].  i could, i suppose
(at what consequence?:) [pacman -R npm], then re-install.  (though i
assume i'd have the same problem, as pacman would presumably leave
untouched the files not owned by npm.)  i could just delete the
offending files pacman complains about (meant/.github/..., and
minimist/...).

okay, thanks in advance for any thoughts.

cheers, Greg


More information about the arch-general mailing list