"Cordoba platform add android" shasum error

I am working on setting up and example HelloWorld at http://cordova.apache.org/docs/en/3.5.0//guide_cli_index.md.html#The%20Command-Line%20Interface on Debian Stable and running the issue in command

cordova platform add android

      

Output error message:

npm http GET https://registry.npmjs.org/cordova-android/-/cordova-android-3.6.1.tgz
Unable to fetch platform android: Error: shasum check failed for .../tmp/npm-29259-W2mnHZlo/1410473956287-0.27467933809384704/tmp.tgz
Expected: b9138a0743c4f424ee62721c22dac84e8d1ca087
Actual:   a5c74dea5a0225566e4a54185d8639a7f7f6ac3e

      

I tried to use wget to fetch Cordova-android-3.6.1.tgz but

shasum cordova-android-3.6.1.tgz

      

returns the same a5c checksum ... as above. i looked at registry.npmjs.org/cordova-android in browser and it defines b91 checksum ...

So, is this a bug, or is there a parameter that changes the way the shasum is calculated? (the -a shasum option changes the output, but none of the values ​​match).

12sep2014: Thank you. Both answers worked, but I don't have enough reputation to promote them. I chose the longer answer somewhat arbitrarily as the "official" correct one.

Another workaround I've found is the usegit option:

cordova platform --usegit add android

      

+3


source to share


2 answers


It was a bug in the packaging of the NPM distribution of the latest cordova packages - apparently related to https://github.com/npm/npm/issues/5414

As a workaround, you can unblock the cordona android package you downloaded and run the command



cordova platform add <path_to_cordova_android>

      

The SHA-1 checksum of the official package at apache.org ( https://dist.apache.org/repos/dist/release/cordova/platforms/cordova-android-3.6.1.tgz ) matches what you found, so not a file corruption issue in npm, just an error in the publishing process.

+3


source


this is an open bug https://issues.apache.org/jira/browse/CB-7526

reinstall cordova



sudo npm install -g cordova

+5


source







All Articles