"Version not found" when i trying to install something via npm - node.js

There is a problem, with npm.
When i trying to install something, i see this error. what's wrong? (Ubuntu 12.04)
root#server:~# sudo npm install bower -g
npm ERR! Error: version not found: bower : bower/bower
npm ERR! at RegClient.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:308:14)
npm ERR! at Request._callback (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65)
npm ERR! at Request.self.callback (/usr/lib/node_modules/npm/node_modules/request/request.js:236:22)
npm ERR! at Request.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/request.js:1142:14)
npm ERR! at Request.emit (events.js:117:20)
npm ERR! at IncomingMessage.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/request.js:1096:12)
npm ERR! at IncomingMessage.emit (events.js:117:20)
npm ERR! at _stream_readable.js:944:16
npm ERR! at process._tickCallback (node.js:442:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.2.0-35-virtual
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "bower" "-g"
npm ERR! cwd /root
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm ERR! not ok code 0

ould you please upload your npm-debug.log as a gist http://gist.github.com? If possible, run npm with at least one -d flag to increase the logging level.
There have been a lot of improvements to npm -- especially around conflicts and race conditions during install -- since 1.4.28. Can you try updating your npm installation?
To update npm, run npm -g install npm#latest
For some Linux distributions (Debian/Ubuntu and RedHat/CentOS), the latest node version provided by the distribution may lag behind the stable version. Here are instructions from NodeSource on getting the latest node.
Thanks!

Related

npm-adduser failing on entering npm account's credentials

I had created an npm package using a different machine. I git cloned that package into a different machine and tried running npm publish and got the following error:
npm ERR! need auth auth and email required for publishing
npm ERR! need auth You need to authorize this machine using `npm adduser`
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "publish"
npm ERR! cwd /home/tarun/me/github/ng-popover
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! code ENEEDAUTH
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/tarun/me/github/ng-popover/npm-debug.log
npm ERR! not ok code 0
I figured I would need to run npm-adduser. So, I ran it and entered my credentials of my npm account. Then I got the following error:
npm http PUT https://registry.npmjs.org/-/user/org.couchdb.user:tarun-dugar
npm http 400 https://registry.npmjs.org/-/user/org.couchdb.user:tarun-dugar
npm ERR! Error: ValidationError: child "password" fails because ["password" is required] : -/user/org.couchdb.user:tarun-dugar
npm ERR! at RegClient.<anonymous> (/usr/share/npm/node_modules/npm-registry-client/lib/request.js:272:14)
npm ERR! at Request.self.callback (/usr/lib/nodejs/request/index.js:148:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/index.js:896:14)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage.<anonymous> (/usr/lib/nodejs/request/index.js:847:12)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
npm ERR! at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "adduser"
npm ERR! cwd /home/tarun/me/github/ng-popover
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/tarun/me/github/ng-popover/npm-debug.log
npm ERR! not ok code 0
Any idea how I can solve this issue?
The problem was that I was using an old version of npm (1.3.10). To solve this I upgraded npm using the tips from this link: upgrade npm on ubuntu
And finally adding a symlink as described in this link: symlink

Verbose bad json errors installing jshint via node 0.10.25

I am trying to install jshint on a Mint Linux system using:
sudo npm install -g jshint
And I get the following error. The garbled error message fills my terminal buffer above this point.
#�:�b8���<f+)�m��r�W^��Ä�?ՎZq���Î���>��������� eV{�Y�Р�?���Hm���*Zm�
`S��I}�o����������W#��W*w��c�b�b�)f��z���)/��M�6��o��7���^&�Sר�+��\�/6���n������g[���m����~��?��WX�G�k�������{�
npm ERR! at Object.parse (native)
npm ERR! at RegClient.<anonymous> (/usr/share/npm/node_modules/npm-registry-client/lib/request.js:238:23)
npm ERR! at Request.self.callback (/usr/lib/nodejs/request/index.js:148:22)
npm ERR! at Request.EventEmitter.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/index.js:896:14)
npm ERR! at Request.EventEmitter.emit (events.js:117:20)
npm ERR! at IncomingMessage.<anonymous> (/usr/lib/nodejs/request/index.js:847:12)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
npm ERR! at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Linux 3.19.0-32-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "jshint"
npm ERR! cwd /home/rnichols
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! type unexpected_token
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/rnichols/npm-debug.log
npm ERR! not ok code 0
However, I can less /home/rnichols/npm-debug.log and scroll down to the point where the problem appears to start, which I believe is here:
252 http 200 https://registry.npmjs.org/lodash
253 verbose bad json ^_^#^#^#^#^#^D^C�Y�o�6^L�W^D?'�e˿�=t#_6ܞ��e�^U�H'�lː��u������ɺ����[
253 verbose bad json 䡈^\�^T���B������"h^L�a^S,�ESC�[z��L�y�`Q^Vu^N�B�
253 verbose bad json �C^ ��(M*P9�w��cu�AY�;m:���d��^F�FZ6:�h�I^S���N����>h�����0^N>-�-ځ�Lo����^W{��N��f^Q�����e`M��^]��7Ra��c����^C�#^Y�����F:^F�ho��=s�^U^_Y��d[�)d����N^F�^E��5��G����I^#��t�a5J7�9či��k^O�ƹ~�X���m�*T�]U^T���a��}+�G
I can access https://registry.npmjs.org/lodash in my browser and it looks OK, so I'm not sure where the bad JSON is coming from.
How can I install jshint without getting this error?
There's an npm issue (they were gzipping responses which broke older versions): https://github.com/npm/npm/issues/12196
Upgrading npm to 3.8.5 fixed the problem.
As describe in https://askubuntu.com/questions/562417/how-do-you-update-npm-to-the-latest-version I had to run sudo npm install -g npm twice before npm would update.

npm brunch stop functioning on ubuntu 12.04, 14.04, 14.10

I have been using brunch from more than 1 year in my application, from yesterday it has been observed that suddenly it has stopped functioning. I am getting error in return to an attempt to run the command "brunch watch"
No command 'brunch' found, did you mean:
Command 'crunch' from package 'crunch' (universe)
Command 'branch' from package 'rheolef' (universe)
brunch: command not found
So, I tried to install brunch again with command sudo npm install -g brunch which resulted in another error:
npm WARN optional dep failed, continuing fsevents#0.3.7
npm ERR! Error: failed to fetch from registry: https://registry.npmjs.org/ansi-color
npm ERR! at RegClient.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:159:18)
npm ERR! at cb (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:57:9)
npm ERR! at RegClient.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:137:16)
npm ERR! at cb (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:166:9)
npm ERR! at RegClient.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:320:12)
npm ERR! at Request._callback (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65)
npm ERR! at Request.self.callback (/usr/lib/node_modules/npm/node_modules/request/request.js:236:22)
npm ERR! at Request.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/request.js:1142:14)
npm ERR! at Request.emit (events.js:117:20)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.16.0-38-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "brunch"
npm ERR! cwd /path/to/application
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! not ok code 0
Note: Above error log is from ubuntu 14.10 and node -v v0.10.37 and npm -v 1.4.28.
Any help will be much appreciated.

Installing Grunt on RedHat

I'm trying to create a red hat build server and need to install grunt globally.
Running: Red Hat Enterprise Linux Server release 6.6 (Santiago)
I tried: sudo npm install -g grunt-cli
However, this gived the error:
Error: user admin not allowed to access it : grunt-cli
npm ERR! at RegClient.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:308:14)
npm ERR! at Request._callback (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65)
npm ERR! at Request.self.callback (/usr/lib/node_modules/npm/node_modules/request/request.js:236:22)
npm ERR! at Request.emit (events.js:98:17)
npm ERR! at Request.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/request.js:1142:14)
npm ERR! at Request.emit (events.js:117:20)
npm ERR! at IncomingMessage.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/request.js:1096:12)
npm ERR! at IncomingMessage.emit (events.js:117:20)
npm ERR! at _stream_readable.js:944:16
npm ERR! at process._tickCallback (node.js:448:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 2.6.32-504.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "grunt-cli"
npm ERR! cwd /root
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/npm-debug.log
npm ERR! not ok code 0
What commands do i need to run to be able to install this? Im running as root.

Error: failed to fetch from registry: kanso

While Im in the process of configuring Kleks i wanted to install kanso according to this github article.
I successfully installed the npm and try to install kanso afterword, This is the command that used:
stratos#Dev-PC:~$ sudo npm install -g kanso
Error log:
npm http GET https://registry.npmjs.org/kanso
npm ERR! Error: failed to fetch from registry: kanso
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/stratos/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.11.0-26-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "kanso"
npm ERR! cwd /home/stratos
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: kanso
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/stratos/npm-debug.log
npm not ok
stratos#Dev-PC:~$
My internet connection is working properly. What is the reason for this issue?
This is due to the ubuntu version that I used, which is older version of ubuntu 12.04. I ran the same code in ubuntu later version it worked successfully. Since Im using npm i have no other choice than upgrading the ubuntu version. Hope npm will fix this backward capability issue in there future releases.

Resources