18

I'm getting the following error while installing API Connect toolkit:

sha1-UhOHSxsj+deaxi0QbjKXDirzcn8= integrity checksum failed when using sha1: wanted sha1-UhOHSxsj+deaxi0QbjKXDirzcn8= but got sha1-208ds/bfbkHrcce1kMfz2sLUPhs=. (627039 bytes)

Node version:- 6.10.3 NPM version:- 5.0.1

I'm trying to install API Connect toolkit on a windows 7 workstation (64-bit) using npm install -g apiconnect command.

What could be the next steps for fixing this issue ?

Ravi Bhatt
  • 181
  • 1
  • 1
  • 6

9 Answers9

32

I encountered this issue, fortunately, I find the solution in Github:

this is caused by the package-lock.json,

so I delete it: rm package-lock.json

enter image description here

then I execute the npm install it works for me.

mojoblanco
  • 683
  • 1
  • 7
  • 17
aircraft
  • 25,146
  • 28
  • 91
  • 166
  • 1
    After doing stuff like reinstalling npm, cleaning cache, removing node_modules... with no success, deleting package-lock.json is what did the trick – Kilian Perdomo Curbelo Nov 29 '18 at 10:57
  • I searched on goolge for a very long time but no solution works for me. This is the only solution that works! – frank Feb 14 '19 at 07:21
6

Go to project dir and enter the following commands in fx powershell or cmd.

rm ./package-lock.json
npm cache clear --force
npm install -g npm

That worked for me.

nelion
  • 1,712
  • 4
  • 17
  • 37
4

I was getting similar error in Node(v8.1.0) and NPM(5.0.3) Version in Windows 10. Followed following steps to fix this issue. a) Uninstalled npm & Node.js completly. b) Delete "npm" & "npm-cache" folders from "C:\Users\\AppData\Roaming" location. c) Install latest node version through ".msi" d) from node command prompt run "npm i -g npm" e) move to your project location and run "npm install" it should work.

4

I was also getting the same problem but solved by

(1st get older version of npm 4.x.x)

npm install -g npm@4.6.1

next optional in your case if you are building something and in your project package.lock.json is present delete package.lock.json (it means node version 5 is was installed hance some installers (like while deploying app on Heroku app) automatically detect this file and upgrade to version 5)

Now Try npm install it should work

Thank you

Liam
  • 27,717
  • 28
  • 128
  • 190
hmharsh3
  • 335
  • 3
  • 11
  • I found that removing the `package-lock.json` file, on a project that did not use it, fixed the error. It appears that the file versions referenced in `package.json` were not compatible with what had been added to `package-lock.json`, or were not available for that particular version of `node`. This was on a machine where the developer had downgraded `node` without cleaning the local `node_modules` or `npm`'s cache. – tephyr Nov 21 '17 at 20:53
  • 1
    you saved my day. None of the suggested solution works except downgrading npm as suggested by you. – Amitesh Oct 25 '18 at 11:54
4

As of npm 5, you can use npm-cache to verify the contents of the cache folder, e.g.:

npm cache verify

Then re-run the install again.

kenorb
  • 155,785
  • 88
  • 678
  • 743
1

There are multiple solutions to this problem. I've encountered it many times and always different things helped me.

A. At first try cleaning the cache: npm cache clean --force then npm install

B. Second you can try npm install --update-binary

C. Third option is to try A and delete node_modules folder and then npm install

D. Fourth option is to uninstall nodejs reboot and reinstall and then try npm install

E. Last of my options which worked for me was to delete npm and npm-cache folders in Users%username%\AppData\Roaming and running npm install

You can try also other combinations usually its best to always do A and clean the cache at least or delete the node_modules folder.

Ricsie
  • 319
  • 5
  • 14
0

It Must help You :

Simple soultion:

sudo npm i npm@latest -g
Shashwat Gupta
  • 5,071
  • 41
  • 33
-1

try again, add params ' --unsafe-perm=true ' npm install -g plugman --unsafe-perm=true

liubiqu
  • 75
  • 2
-4
yarn install

worked for a similar error. check here

Liam
  • 27,717
  • 28
  • 128
  • 190
Jose Kj
  • 2,912
  • 2
  • 28
  • 40