obazoud/statusdashboard — Issue #20: Error: Cannot find module 'socket.io-client'
Author: philcryer
Created: 2012-01-27 18:26:57+00:00
State: open

I'm running Ubuntu 10.04.3 LTS, I followed the install docs, but it fails to install socket.io-client. Now when I run it, with my new env 'test', I can see the board in my browser, so that part is working, but I can't see any data. Here's the log, with the error I suspect is the culprit:

root@eol-app8:/opt/statusdashboard# export APP_ENV=test
root@eol-app8:/opt/statusdashboard# node server.js
27 Jan 13:11:10 - Loading settings: olivier
27 Jan 13:11:10 - Loading settings: olivier
27 Jan 13:11:10 - Refreshing status board...
27 Jan 13:11:10 - Error: Cannot find module 'socket.io-client'
Creating the plugin: /opt/statusdashboard/plugins/history/history_plugin.js
27 Jan 13:11:15 - Refreshing status board...

A new npm install doesn't fix it, and calling out just socket.io-client fails like this:

root@eol-app8:/opt/statusdashboard# npm install socket.io-client
npm WARN irc@0.2.0 package.json: bugs['web'] should probably be bugs['url']
npm WARN journey@0.4.0-pre-3 dependencies field should be hash of : pairs
npm WARN underscore@1.1.6 dependencies field should be hash of : pairs
npm http GET https://registry.npmjs.org/socket.io-client
npm http 304 https://registry.npmjs.org/socket.io-client
npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.8.7.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.8.7.tgz

npm ERR! TypeError: Cannot call method 'call' of undefined
npm ERR! at Object.lchown (/usr/lib/nodejs/npm/node_modules/graceful-fs/graceful-fs.js:228:17)
npm ERR! at setProps (/usr/lib/nodejs/npm/node_modules/fstream/lib/writer.js:240:19)
npm ERR! at Object.oncomplete (/usr/lib/nodejs/npm/node_modules/fstream/lib/writer.js:206:7)
npm ERR! You may report this log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Linux 2.6.32-33-generic
npm ERR! command "node" "/usr/bin/npm" "install" "socket.io-client"
npm ERR! cwd /opt/statusdashboard
npm ERR! node -v v0.6.8
npm ERR! npm -v 1.1.0-2
npm ERR! type non_object_property_call
npm ERR! arguments [ 'call', undefined ]
npm ERR! message Cannot call method 'call' of undefined
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /opt/statusdashboard/npm-debug.log
npm not ok