npm: SHA Checksum fails, tar files modified?
I have an issue when installing npm packages, it appears that the sha1 checksum verification fails. Is this due to a modification to the tar files or a different issue? Installing on plain Ubuntu works.
To replicate:
- Try to install npm:
curl -L https://www.npmjs.com/install.sh | sh - It will error out on a dependency installation:
> node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make doc-clean && make -j4 doc
npm ERR! Linux 3.4.0+
npm ERR! argv "/usr/bin/nodejs" "/tmp/npm.158/package/cli.js" "install" "-gf"
npm ERR! node v5.11.0
npm ERR! npm v3.8.9
npm ERR! shasum check failed for /tmp/npm-200-dfb4562b/registry.npmjs.org/hoek/-/hoek-2.16.3.tgz
npm ERR! Expected: 20bb7403d3cea398e91dc4710a8ff1b8274a25ed
npm ERR! Actual: 87cd98ad78a83e428a59bba650f85b2cfd709fc7
npm ERR! From: https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/npm.158/package/npm-debug.log
It failed
➜ ~
The same issue occurs when npm is already installed and you try to install another package.
same here. just installed node, npm; then tried to install gulp via command line and here's the output:
npm install --global gulp-cli
npm ERR! Linux 3.4.0+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--global" "gulp-cli"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! shasum check failed for /tmp/npm-20-e7d51d4e/registry.npmjs.org/gulp-cli/-/gulp-cli-1.2.1.tgz
npm ERR! Expected: 9fd52c50e44fe8eb04a54b3cee23d4a021e3fd3d
npm ERR! Actual: 1950487149d0d76267a7c9d81f345fc9ad6087f4
npm ERR! From: https://registry.npmjs.org/gulp-cli/-/gulp-cli-1.2.1.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/cmsv/npm-debug.log
Same here (v6 of node):
npm ERR! Please include the following file with any support request:
npm ERR! /home/gordon/git/Visualization/npm-debug.log
gordon@DELL-XPS-15:~/git/Visualization$ npm install -g gulp
npm ERR! Linux 3.4.0+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "gulp"
npm ERR! node v6.1.0
npm ERR! npm v3.8.6
npm ERR! shasum check failed for /tmp/npm-1079-e4e4f4af/registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz
npm ERR! Expected: 8f90341e68a53ccc928788dacfcd11b36eb9b78e
npm ERR! Actual: 86650610e950f4422d99009473f9dbd265817577
npm ERR! From: https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/gordon/git/Visualization/npm-debug.log
I suspect this is caused by: https://github.com/Microsoft/BashOnWindows/issues/313
related https://github.com/npm/npm/issues/12436
I have same issue (Win10 build 14342) using node 4.x, 5x. and 6.x from nodesource repo. I am able to install npm modules when I stick to the ubuntu trusty repo packages, (nodejs v0.10.25 & npm v1.3.10) but I can't seem to run anything, instead I just get this:
/usr/bin/env: node: No such file or directory
@GordonSmith I believe you are right. The fix for that issue should hopefully be in the next insider fast ring build.
Is there any temporary workaround?
@wycats No it is an issue in lxcore.sys so you'll need an updated version of the driver.
@ballPointPenguin for later versions the node package name was renamed to nodejs so you have to add a symlink for "node" to work:
sudo ln -s which nodejs /usr/bin/node
SO: nodejs vs node on ubuntu 12.04
That said I don't think is related to the checksum fails
Thanks @Aigeec that helps. I'm still stuck on v0.10.25 until this issue resolves.
Similar error for installing webpack, looking forward to the next insider preview.
Hard way but not efficient :)
$ curl -O `npm show bower dist.tarball`
$ npm install bower-x.x.x.tgz # SUCCESS
$ curl -O `npm show grunt-cli dist.tarball`
$ npm install grunt-cli-x.x.x.tgz # SUCCESS. If it fails just retry npm install tarball again.
$ npm ls
/home/me
├── [email protected]
└─┬ [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
└── [email protected]
Works on my build 14342. Please try download tarball file on your windows side, not on bash, if you get broken files even if npm install successed. Overwrite it over package under node_moduels or just extract it and go.
$ tar xvzf /mnt/c/Users/me/Downloads/bower-*-*-*.tgz
$ ./package/bin/bower
Usage:
bower <command> [<args>] [<options>]
Commands:
cache Manage bower cache
help Display help information about Bower
home Opens a package homepage into your favorite browser
info Info of a particular package
init Interactively create a bower.json file
...
$ # npm ln works too
$ cd package
$ sudo npm ln
$ bower --version
1.7.9
I installed nodejs & npm through this way http://askubuntu.com/a/635469 Still getting a sha1 checksum error when trying to install keystone
~$ sudo npm install -g generator-keystone
npm WARN deprecated [email protected]: the module is now available as 'css-select'
npm WARN deprecated [email protected]: the module is now available as 'css-what'
npm ERR! Linux 3.4.0+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "generator-keystone"
npm ERR! node v5.11.1
npm ERR! npm v3.8.6
npm ERR! shasum check failed for /tmp/npm-35-00d28d35/registry.npmjs.org/hoek/-/hoek-2.16.3.tgz
npm ERR! Expected: 20bb7403d3cea398e91dc4710a8ff1b8274a25ed
npm ERR! Actual: 8756f794adec4fee08aedda4558f61816f121db3
npm ERR! From: https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/mitul/npm-debug.log
Latest build doesn't seem to have fixed the issue?
I've verified this is fixed in build 14352, please reopen if you continue to see this issue. Thanks!
I'm having this issue on build 14393.1358. Doesn't seem to be fixed. 😕
having this issue, i went to my windows file and try to install npm install and its saying: Syntax error: word unexpected (expecting "in").