19

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 ?

6
  • Please add some code samples or references to make the question more clear so that more people can help you. Commented Jun 2, 2017 at 14:55
  • 1
    Where are you trying to install from? Commented Jun 2, 2017 at 15:34
  • What is your npm registry set to? Commented Jun 6, 2017 at 20:44
  • NPM registry was pointing to npmjs.com/package/apiconnect to pull API Connect developer toolkit. Commented Jun 7, 2017 at 17:40
  • If you try it again does that still happen? Commented Jun 8, 2017 at 16:10

9 Answers 9

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.

Sign up to request clarification or add additional context in comments.

2 Comments

After doing stuff like reinstalling npm, cleaning cache, removing node_modules... with no success, deleting package-lock.json is what did the trick
I searched on goolge for a very long time but no solution works for me. This is the only solution that works!
7

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.

Comments

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.

Comments

4

I was also getting the same problem but solved by

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

npm install -g [email protected]

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

2 Comments

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.
you saved my day. None of the suggested solution works except downgrading npm as suggested by you.
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.

Comments

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.

Comments

0

It Must help You :

Simple soultion:

sudo npm i npm@latest -g

Comments

-1

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

Comments

-4
yarn install

worked for a similar error. check here

1 Comment

yarn is completely unrelated to NPM. More detail needs to be provided for this answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.