Page 1 of 1

Can't upgrade NPM because of conflicts

Posted: Sun May 20, 2018 5:39 am
by arifur
Error
sudo pacman -Syu

Code: Select all

error: failed to commit transaction (conflicting files)
npm: /usr/lib/node_modules/npm/changelogs/CHANGELOG-5.md exists in filesystem
npm: /usr/lib/node_modules/npm/doc/cli/npm-audit.md exists in filesystem
npm: /usr/lib/node_modules/npm/doc/cli/npm-hook.md exists in filesystem
npm: /usr/lib/node_modules/npm/doc/cli/npm-install-ci-test.md exists in filesystem
npm: /usr/lib/node_modules/npm/html/doc/cli/npm-audit.html exists in filesystem
npm: /usr/lib/node_modules/npm/html/doc/cli/npm-hook.html exists in filesystem
npm: /usr/lib/node_modules/npm/html/doc/cli/npm-install-ci-test.html exists in filesystem
npm: /usr/lib/node_modules/npm/lib/audit.js exists in filesystem
npm: /usr/lib/node_modules/npm/lib/hook.js exists in filesystem
npm: /usr/lib/node_modules/npm/lib/install-ci-test.js exists in filesystem
npm: /usr/lib/node_modules/npm/lib/install/audit.js exists in filesystem
npm: /usr/lib/node_modules/npm/man/man1/npm-audit.1 exists in filesystem
npm: /usr/lib/node_modules/npm/man/man1/npm-hook.1 exists in filesystem
npm: /usr/lib/node_modules/npm/man/man1/npm-install-ci-test.1 exists in filesystem
npm: /usr/lib/node_modules/npm/node_modules/byte-size/LICENSE exists in filesystem

Solution

Code: Select all

sudo npm --global remove npm
sudo pacman -Syu
Even after this if any other conflicts reamain, deleting those files may solve the issue.