Error de pacman -Syu con npm (archivos conflictivos)

Error de pacman -Syu con npm (archivos conflictivos)

Intenté ejecutar el comando pacman -Syu y encontré este error:

(417/417) sprawdzanie kluczy w bazie                                                                                   [########################################################################] 100%
(417/417) sprawdzanie spójności pakietów                                                                               [########################################################################] 100%
(417/417) wczytywanie listy plików                                                                                     [########################################################################] 100%
(417/417) sprawdzanie konfliktów plików                                                                                [########################################################################] 100%
błąd:  nie udało się dokonać transakcji (konfliktujące pliki)
npm: /usr/lib/node_modules/npm/node_modules/cmd-shim/lib/to-batch-syntax.js znajduje się w systemie plików
npm: /usr/lib/node_modules/npm/node_modules/gentle-fs/lib/chown.js znajduje się w systemie plików
npm: /usr/lib/node_modules/npm/node_modules/gentle-fs/lib/mkdir.js znajduje się w systemie plików
npm: /usr/lib/node_modules/npm/node_modules/read-cmd-shim/LICENSE znajduje się w systemie plików
Wystąpiły błędy, nie zaktualizowano żadnego pakietu.

Que puedes traducir de la siguiente manera:

(417/417) checking the keys in the database [######################################## ################################] 100%
(417/417) checking package integrity [######################################### ###############################] 100%
(417/417) loading file list [######################################### ###############################] 100%
(417/417) checking file conflicts [######################################### ###############################] 100%
error: transaction failed (conflicting files)
npm: /usr/lib/node_modules/npm/node_modules/cmd-shim/lib/to-batch-syntax.js is in the file system
npm: /usr/lib/node_modules/npm/node_modules/gentle-fs/lib/chown.js is in the file system
npm: /usr/lib/node_modules/npm/node_modules/gentle-fs/lib/mkdir.js is in the file system
npm: / usr / lib / node_modules / npm / node_modules / read-cmd-shim / LICENSE is in the file system
There were errors, no package has been updated.

Respuesta1

Inicie sesión como root, elimine los archivos enumerados y vuelva a ejecutar.

Eso sucedió porque probablemente ejecutaste npm directamente para actualizarse (probablemente)... Lo cual deberías evitar...(Aquí hay un ejemplo de por qué, pero es una opinión personal.).

Puedes considerarNVMcomo se menciona en elMétodo de instalación alternativo de Arch Wiki...

información relacionada