Wilson Campusano
Wilson Campusano

Reputation: 616

npm install express give me checksum error

i have node v.0.10.30 and npm 1.4.21 installed, when i execute this command

npm install express

i get this as a result

 Error: shasum check failed for /tmp/npm-4273-g1Rb0gCE/registry.npmjs.org/express/-  /express-4.9.7.tgz
npm ERR! Expected: ae3e0bdf0095749467fde125afd77e7988ff0fbb
npm ERR! Actual:   da39a3ee5e6b4b0d3255bfef95601890afd80709
npm ERR! From:     https://registry.npmjs.org/express/-/express-4.9.7.tgz
npm ERR!     at /usr/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous>(/usr/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:938:16
npm ERR!     at process._tickCallback (node.js:419:13)

more log from npm-debug.log file

0 info it worked if it ends with ok
  1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'express' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/bin/node
5 warn package.json [email protected] No description
6 warn package.json [email protected] No repository field.
7 warn package.json [email protected] No README data
8 verbose readDependencies using package.json deps
9 verbose cache add [ 'express', null ]


19 verbose lock express@ /home/wilson/.npm/64a534c1-express.lock
20 silly addNameRange { name: 'express', range: '*', hasData: false }
21 verbose request where is /express
22 verbose request registry https://registry.npmjs.org/
23 verbose request id a071fcd68daa94eb
24 verbose url raw /express
25 verbose url resolving [ 'https://registry.npmjs.org/', './express' ]
26 verbose url resolved https://registry.npmjs.org/express
27 verbose request where is https://registry.npmjs.org/express
28 info trying registry request attempt 1 at 20:00:01
29 verbose etag "7FVLRT9Y9RQJKGVQC7099FKQ4"
30 http GET https://registry.npmjs.org/express
31 http 304 https://registry.npmjs.org/express
32 silly registry.get cb [ 304,
32 silly registry.get   { date: 'Sat, 11 Oct 2014 00:00:01 GMT',
32 silly registry.get     server: 'Apache',
32 silly registry.get     via: '1.1 varnish',
32 silly registry.get     'last-modified': 'Fri, 10 Oct 2014 23:59:57 GMT',
32 silly registry.get     'cache-control': 'max-age=60',
32 silly registry.get     etag: '"7FVLRT9Y9RQJKGVQC7099FKQ4"',
32 silly registry.get     'x-served-by': 'cache-iad2130-IAD',
32 silly registry.get     'x-cache': 'HIT',
32 silly registry.get     'x-cache-hits': '2',
32 silly registry.get     'x-timer': 'S1412985601.881420,VS0,VE0',
32 silly registry.get     vary: 'Accept',
32 silly registry.get     'content-length': '0',
32 silly registry.get     'keep-alive': 'timeout=10, max=50',
32 silly registry.get     connection: 'Keep-Alive' } ]
33 verbose etag https://registry.npmjs.org/express from cache
34 silly addNameRange number 2 { name: 'express', range: '*', hasData: true }

my os is ubuntu 14.04 npm command recommended me to report this log at npm's github repository

Upvotes: 7

Views: 9364

Answers (4)

Rakesh
Rakesh

Reputation: 744

First start command prompt as an administrator then run your command.

Upvotes: 0

MasterAM
MasterAM

Reputation: 16478

I had a similar issue which was caused by a corrupt download.

It was easily solved by purging the offending package from the cache and re-running the installation.

$ npm cache clean express
$ npm i express

(in my case the corrupt package was a dependency, so I purged it from cache, and not the package that I was trying to install, of course)

Upvotes: 3

gp.
gp.

Reputation: 8225

download the file https://registry.npmjs.org/express/-/express-4.9.7.tgz

then install from the file

npm install ./express-4.9.7.tgz

Upvotes: 9

vadersfather
vadersfather

Reputation: 9299

Some of these error messages will typically come up when you are not accessing the root admin of the system while executing the install.

When I opened the terminal and ran $ sudo -i to access the #root and then entered $ npm install express , it was installed correctly. Hopefully this helps!

Upvotes: 3

Related Questions