Saturday, 20 May 2017

How to fix npm update error? (# npm install npm@latest -g)

How to fix npm update error? I run as root

# npm install npm@latest -g

usr/lib
└── (empty)

npm ERR! Linux 4.10.14-200.fc25.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "npm@latest" "-g"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! path /usr/lib/node_modules/npm/node_modules/node-gyp
npm ERR! code EEXIST
npm ERR! errno -17
npm ERR! syscall mkdir

npm ERR! EEXIST: file already exists, mkdir '/usr/lib/node_modules/npm/node_modules/node-gyp'
npm ERR! File exists: /usr/lib/node_modules/npm/node_modules/node-gyp
npm ERR! Move it away, and try again.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/npm-debug.log
npm ERR! code 1

And end up without npm.

The log file is at https://pastebin.com/UuWNhNwe

my node version is 6.10.2, using fedora core 25 64bits



via Pedro Polonia

No comments:

Post a Comment