I installed nodejs via apt, as well as the nodejs-legacy package, trying to take a quick look at this platform. It won't be that easy.
In any case, the search facility does not work, and I assume that this means that the installation was somehow incomplete.
Googling suggested that it might have something to do with permissions in the ~ / .npm directory. I doubt it, but I tried to cut this directory for my user, and also run the "npm search" command with sudo, both with the same result.
Update with additional information:
Installation Procedure:
$sudo apt-get install nodejs nodejs-legacy
Exit the current command:
$ npm search
npm ERR! TypeError: Object.keys called on non-object
npm ERR! at Function.keys (native)
npm ERR! at stripData (/usr/share/npm/lib/search.js:89:28)
npm ERR! at Array.map (native)
npm ERR! at filter (/usr/share/npm/lib/search.js:73:6)
npm ERR! at /usr/share/npm/lib/search.js:63:21
npm ERR! at RegClient.requestAll_ (/usr/share/npm/node_modules/npm-registry- client /lib/get.js:66:5)
npm ERR! at RegClient.<anonymous> (/usr/share/npm/node_modules/npm-registry-client /lib/get.js:58:19)
npm ERR! at fs.js:268:14
npm ERR! at /usr/lib/nodejs/graceful-fs/graceful-fs.js:103:5
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/x/temp/npm-debug.log npm
npm ERR! System Linux 3.11.6-031106-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "search"
npm ERR! cwd /home/x/
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm ERR! type called_on_non_object
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/x/npm-debug.log
npm ERR! not ok code 0
Log file information:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'search' ]
2 info using npm@1.2.18
3 info using node@v0.10.15
4 warn Building the local index for the first time, please be patient
5 verbose url raw /-/all
6 verbose url resolving [ 'https://registry.npmjs.org/', './-/all' ]
7 verbose url resolved https://registry.npmjs.org/-/all
8 info trying registry request attempt 1 at 10:56:16
9 http GET https://registry.npmjs.org/-/all
10 http 200 https://registry.npmjs.org/-/all
11 error TypeError: Object.keys called on non-object
11 error at Function.keys (native)
11 error at stripData (/usr/share/npm/lib/search.js:89:28)
11 error at Array.map (native)
11 error at filter (/usr/share/npm/lib/search.js:73:6)
11 error at /usr/share/npm/lib/search.js:63:21
11 error at /usr/share/npm/node_modules/npm-registry-client/lib/get.js:89:14
11 error at /usr/lib/nodejs/graceful-fs/graceful-fs.js:103:5
11 error at Object.oncomplete (fs.js:107:15)
12 error If you need help, you may report this log at:
12 error <http://bugs.debian.org/npm>
12 error or use
12 error reportbug
13 error System Linux 3.11.0-15-generic
14 error command "/usr/bin/nodejs" "/usr/bin/npm" "search"
15 error cwd /home/x
16 error node -v v0.10.15
17 error npm -v 1.2.18
18 error type called_on_non_object
19 verbose exit [ 1, true ]
How to interpret and correct this error? I could not extract anything from this debug information.