1

I trying install npm but system shows me this error:

[root@myserver etc]# npm install npm@latest -g
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm ERR! Error: failed to fetch from registry: npm
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/get.js:134:18)
npm ERR!     at cb (/usr/lib/node_modules/npm-registry-client/lib/request.js:27:9)
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/request.js:122:16)
npm ERR!     at cb (/usr/lib/node_modules/npm-registry-client/lib/request.js:158:9)
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/request.js:303:12)
npm ERR!     at Request.self.callback (/usr/lib/node_modules/request/index.js:148:22)
npm ERR!     at Request.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/usr/lib/node_modules/request/index.js:891:14)
npm ERR!     at Request.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/usr/lib/node_modules/request/index.js:842:12)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Linux 3.10.0-693.11.1.el7.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "npm@latest" "-g"
npm ERR! cwd /etc
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.3.6
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /etc/npm-debug.log
npm ERR! not ok code 0

1 Answer 1

2

I think the problem is version can you try this

yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -
1
  • yes. it was from version. removing the old version is necessary. i did "yum remove" and "yum install" again and fixed. thanks. Jan 4, 2018 at 8:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .