nodejs / node-gyp

Node.js native addon build tool
MIT License
9.95k stars 1.8k forks source link

error: failed to commit transaction (conflicting files) #3057

Closed 3xploiton3 closed 3 months ago

3xploiton3 commented 3 months ago

sudo pacman -S npm

resolving dependencies... looking for conflicting packages...

Package (1) New Version Net Change

extra/npm 10.8.2-1 7.52 MiB

Total Installed Size: 7.52 MiB

:: Proceed with installation? [Y/n] (1/1) checking keys in keyring [############################################] 100% (1/1) checking package integrity [############################################] 100% (1/1) loading package files [############################################] 100% (1/1) checking for file conflicts [############################################] 100% error: failed to commit transaction (conflicting files) npm: /usr/lib/node_modules/npm/node_modules/foreground-child/dist/commonjs/all-signals.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/foreground-child/dist/commonjs/index.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/foreground-child/dist/commonjs/package.json exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/foreground-child/dist/commonjs/proxy-signals.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/foreground-child/dist/commonjs/watchdog.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/foreground-child/dist/esm/all-signals.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/foreground-child/dist/esm/index.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/foreground-child/dist/esm/package.json exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/foreground-child/dist/esm/proxy-signals.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/foreground-child/dist/esm/watchdog.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/json-stream.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/package-json-from-dist/LICENSE.md exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/package-json-from-dist/dist/commonjs/index.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/package-json-from-dist/dist/commonjs/package.json exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/package-json-from-dist/dist/esm/index.js exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/package-json-from-dist/dist/esm/package.json exists in filesystem npm: /usr/lib/node_modules/npm/node_modules/package-json-from-dist/package.json exists in filesystem Errors occurred, no packages were upgraded.

3xploiton3 commented 3 months ago

sudo rm -r /usr/lib/node_modules/npm/node_modules/

fix this issue