Why is it that whenever I try to update something through Pamac or Pacman I get non-useful errors when some package fails to installs and gives me errors like this;
error: failed to commit transaction (conflicting files)
npm: /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/LICENSE.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/LICENSE.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/base-theme.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/demo.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/error.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/has-color.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/plumbing.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/process.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/progress-bar.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/render-template.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/set-immediate.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/set-interval.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/spin.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/template-item.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/theme-set.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/themes.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/lib/wide-truncate.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/is-fullwidth-code-point/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/string-width/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/string-width/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/string-width/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/string-width/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/index.d.ts exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/index.js exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/license exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/package.json exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/npmlog/LICENSE.md exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/npmlog/lib/log.js exists in filesystem
Errors occurred, no packages were upgraded.
If I choose to update something I shouldn’t be presented with non-harmful errors like this. If the package or file or whatever exists in the system and I’m being thrown errors like this and causing the package manager to fail install of a package or upgrade. If these files already exist within the filesystem, just UPDATE, overwrite them if you have to, I don’t really care. If one package provides something that already exists in the package, just ignore and use those files. Is it really that hard? It’s not like you’re gonna break something, especially when the files are just LICENCE.md
or some text or script file like JSON, TXT, JS.
NPM is the outlier here which always breaks and causes issues for other packages, because Node’s packaging is so inconsistent and broken half the time. This why I never like using NPM because it always causes issues, but there are some applications that rely on using NPM which I can’t avoid. Telling the user some file exists in the filesystem is a non-useful error to stop a package update on. If it exists so what, just ignore it and move on with the package install/upgrade, NPM shouldn’t force the package manager to stop for something that isn’t even an error when it’s only a warning, they should be treated as warnings not errors. This probably not even the right place to complain about NPM, and should probably go the devs talk channels and complain directly there about how stupid their packaging system is. – But thing is this also sometimes happens for non NPM packages also, the package manager will halt on warnings like the above that are being treated as errors when they’re really not. It’s not like it’s going to break a compiled binary or library in some grand spectacular way that causes the system to implode on itself.
IF the file exists already, either overwrite it, or ignore it completely.