Npm install express gives me error checksum

I have node v.0.10.30 and npm 1.4.21 when I execute this command

npm install express 

I get it 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 npm@1.4.21 3 info using node@v0.10.30 4 verbose node symlink /usr/bin/node 5 warn package.json app@0.0.0 No description 6 warn package.json app@0.0.0 No repository field. 7 warn package.json app@0.0.0 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 The npm team recommended that I report this log to the npm github repository

+6
source share
4 answers

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

then install from file

 npm install ./express-4.9.7.tgz 
+9
source

Some of these error messages usually appear when you do not gain access to the root system administrator during installation.

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

+3
source

I had a similar problem caused by corrupt download.

This was easily resolved by clearing the damaged package from the cache and restarting the installation.

 $ npm cache clean express $ npm i express 

(in my case, the damaged package was dependent, so I cleared it from the cache, and not from the package that I tried to install, of course)

+3
source

First send the command line as administrator , then run the command.

-1
source

Source: https://habr.com/ru/post/976590/


All Articles