[Failed update] error: failed to commit transaction (conflicting files)

I just tried to update my Manjaro KDE, but the last few lines of the process is as follows:

error: failed to commit transaction (conflicting files)
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiByp8kv8JHgFVrLDz8Z1xlEw.woff exists in filesystem
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2 exists in filesystem
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiByp8kv8JHgFVrLGT9Z1xlEw.woff exists in filesystem
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2 exists in filesystem
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiEyp8kv8JHgFVrJJfecg.woff2 exists in filesystem
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiEyp8kv8JHgFVrJJfedA.woff exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/is-fullwidth-code-point/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/string-width/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/string-width/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/string-width/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/string-width/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/strip-ansi/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/LICENSE-MIT.txt exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/README.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/es2015/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/es2015/text.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/text.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/get-caller-file/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/get-caller-file/index.js.map exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/require-main-filename/CHANGELOG.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs-parser/node_modules/camelcase/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs-parser/node_modules/camelcase/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs-parser/node_modules/camelcase/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs-parser/node_modules/camelcase/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs-parser/node_modules/camelcase/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/lib/completion-templates.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/lib/is-promise.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/lib/middleware.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/ansi-regex/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/ansi-regex/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/ansi-regex/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/ansi-regex/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/find-up/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/find-up/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/find-up/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/find-up/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/is-fullwidth-code-point/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/locate-path/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/locate-path/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/locate-path/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/locate-path/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-limit/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-limit/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-limit/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-limit/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-limit/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-locate/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-locate/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-locate/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-locate/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-try/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-try/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-try/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-try/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-try/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/string-width/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/string-width/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/string-width/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/string-width/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/strip-ansi/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/strip-ansi/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/strip-ansi/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/strip-ansi/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/strip-ansi/readme.md exists in filesystem
Errors occurred, no packages were upgraded.

How to resolve this issue?

You could start here:

https://wiki.archlinux.org/index.php/Pacman#"Failed_to_commit_transaction_(conflicting_files)"_error

1 Like

have you installed npm ?

sudo pacman -Ss npm

somebody did sudo npm is my guess.

4 Likes
$ sudo pacman -Ss npm
[sudo] password for jazz: 
community/npm 6.14.7-1 [installed: 6.14.6-1]
    A package manager for javascript
community/npm-check-updates 7.0.4-1
    Find newer versions of dependencies than what your package.json or bower.json allows
community/semver 7.3.2-1 [installed]
    The semantic version parser used by npm.

$ grep npm /var/log/pacman.log 
[2019-02-07 13:17] [PACMAN] Running 'pacman --color auto -S --asdeps --needed cargo community/npm community/electron community/yarn'
[2019-02-07 13:20] [ALPM] installed npm (6.6.0-1)
[2019-02-09 19:42] [ALPM] upgraded npm (6.6.0-1 -> 6.7.0-1)
[2019-02-19 17:30] [ALPM] upgraded npm (6.7.0-1 -> 6.8.0-1)
[2019-03-12 16:00] [ALPM] upgraded npm (6.8.0-1 -> 6.9.0-1)
[2019-07-03 14:19] [ALPM] upgraded npm (6.9.0-1 -> 6.9.2-1)
[2019-07-09 20:39] [ALPM] upgraded npm (6.9.2-1 -> 6.10.0-1)
[2019-07-18 05:23] [ALPM] upgraded npm (6.10.0-1 -> 6.10.1-1)
[2019-08-02 15:00] [ALPM] upgraded npm (6.10.1-1 -> 6.10.2-1)
[2019-08-13 13:06] [ALPM] upgraded npm (6.10.2-1 -> 6.10.3-1)
[2019-09-05 17:46] [ALPM] upgraded npm (6.10.3-1 -> 6.11.2-2)
[2019-10-10 22:04] [ALPM] upgraded npm (6.11.2-2 -> 6.11.3-1)
[2019-10-14 19:26] [ALPM] upgraded npm (6.11.3-1 -> 6.12.0-1)
[2019-11-05T15:44:43+0100] [ALPM] upgraded npm (6.12.0-1 -> 6.12.1-1)
[2019-12-29T14:15:40+0100] [ALPM] upgraded npm (6.12.1-1 -> 6.13.4-1)
[2020-01-16T15:59:44+0100] [ALPM] upgraded npm (6.13.4-1 -> 6.13.6-1)
[2020-02-28T01:47:25+0100] [ALPM] upgraded npm (6.13.6-1 -> 6.13.7-1)
[2020-03-03T13:19:18+0100] [ALPM] upgraded npm (6.13.7-1 -> 6.14.1-1)
[2020-03-14T14:34:47+0100] [ALPM] upgraded npm (6.14.1-1 -> 6.14.2-1)
[2020-03-24T22:03:16+0100] [ALPM] upgraded npm (6.14.2-1 -> 6.14.3-1)
[2020-03-28T23:30:36+0100] [ALPM] upgraded npm (6.14.3-1 -> 6.14.4-1)
[2020-05-11T23:50:05+0200] [ALPM] upgraded npm (6.14.4-1 -> 6.14.5-1)
[2020-07-19T22:11:39+0200] [ALPM] upgraded npm (6.14.5-1 -> 6.14.6-1)

$ pacman -Qo /usr/lib/node_modules/npm/node_modules/emoji-regex/index.js
error: No package owns /usr/lib/node_modules/npm/node_modules/emoji-regex/index.js

try by remove npm

sudo pacman -Rsn npm
sudo pacman -Syyu
sudo pacman -S npm 
1 Like

To understand why @cscs has accessed the situation correct one must understand the package manager within the realms of an ArchLinux based system.

The package manager - pacman and the supporting library libalpm - keeps track of files which exists as a part of the system.

When pacman encounters files - in system locations - which is not registered within the pacman registry - the package manager refuses to commit the transaction.

This is a very reasonable behavior and the only way to avoid such situations is to avoid using arbitrary applications as root to install files to system locations.

This includes various common development tools like npm, pip, bower, grunt and probably additional tools I haven’t thought of.

Always avoid commands like sudo npm or sudo pip as it will - sooner or later create issues like this.

I have copied one the FAQs from the archived forum - read on below

4 Likes

I just did it, but the last command line returned with the same error again:

$ sudo pacman -S npm 
resolving dependencies...
looking for conflicting packages...

Packages (2) node-gyp-7.0.0-2  npm-6.14.7-1

Total Installed Size:  26,99 MiB

:: Proceed with installation? [Y/n] 
(2/2) checking keys in keyring                                                                   [#########################################################] 100%
(2/2) checking package integrity                                                                 [#########################################################] 100%
(2/2) loading package files                                                                      [#########################################################] 100%
(2/2) checking for file conflicts                                                                [#########################################################] 100%
error: failed to commit transaction (conflicting files)
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiByp8kv8JHgFVrLDz8Z1xlEw.woff exists in filesystem
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2 exists in filesystem
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiByp8kv8JHgFVrLGT9Z1xlEw.woff exists in filesystem
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2 exists in filesystem
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiEyp8kv8JHgFVrJJfecg.woff2 exists in filesystem
npm: /usr/lib/node_modules/npm/docs/public/google-fonts/s/poppins/v12/pxiEyp8kv8JHgFVrJJfedA.woff exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/is-fullwidth-code-point/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/string-width/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/string-width/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/string-width/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/string-width/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/cliui/node_modules/strip-ansi/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/LICENSE-MIT.txt exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/README.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/es2015/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/es2015/text.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/emoji-regex/text.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/get-caller-file/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/get-caller-file/index.js.map exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/require-main-filename/CHANGELOG.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs-parser/node_modules/camelcase/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs-parser/node_modules/camelcase/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs-parser/node_modules/camelcase/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs-parser/node_modules/camelcase/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs-parser/node_modules/camelcase/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/lib/completion-templates.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/lib/is-promise.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/lib/middleware.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/ansi-regex/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/ansi-regex/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/ansi-regex/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/ansi-regex/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/find-up/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/find-up/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/find-up/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/find-up/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/is-fullwidth-code-point/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/locate-path/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/locate-path/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/locate-path/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/locate-path/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-limit/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-limit/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-limit/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-limit/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-limit/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-locate/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-locate/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-locate/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-locate/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-try/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-try/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-try/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-try/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/p-try/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/string-width/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/string-width/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/string-width/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/string-width/readme.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/strip-ansi/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/strip-ansi/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/strip-ansi/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/strip-ansi/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/yargs/node_modules/strip-ansi/readme.md exists in filesystem
Errors occurred, no packages were upgraded.

I was trying to install topsi-project-manager:

Just by reviewing my history, I think I’ve found the culprit at 337 (I don’t remember why I used sudo there, but obviously I tried to use npm without it):

  327  git clone https://github.com/Physiix/topsi-project-manager
  328  npm install vue
  329  cd topsi-project-manager/
  330  npm install vue
  331  cd ..
  332  ll
  333  cat package-lock.json 
  334  rm -rf package-lock.json 
  335  cd -
  336  npm install -g npm
  337  sudo npm install -g npm
  338  npm install vuetify
  339  npm install quill
  340  npm install sortable
  341  yarn
  342  yarn install
  343  yarn run dev
  344  yarn build
  345  kate src/components/dialogs/content/EditNoteDialog.vue &
  346  yarn build
  347  yarn build
  348  yarn run dev

That’s the only occurrence of sudo npm in my history.

And now exactly this is causing your problem.
You can try to force the update via

$ sudo pacman -Syu --overwrite "/usr/lib/node_modules/npm/*"
$ sudo pacman -Syu --overwrite "/usr/lib/node_modules/npm/*"
[sudo] password for jazz: 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do

Ah, you did remove npm. The update went successfully and you now just need to reinstall npm with that same option:

$ pacman -S npm --overwrite "/usr/lib/node_modules/npm/*"
1 Like

Thanks @freggel.doe , this resolved my issue. Special thanks to @linux-aarhus, since I understand how the problem occurred and how to avoid similar issues in the future. Hope this thread will be a good asset for similar stories in the future.

1 Like

Technically the solution was already described in the first answer from @merlock. :wink:

2 Likes

And now it even practically became an accepted answer. :yum: Thanks.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.