5

Trying to get AjaxIM working on my site with Node.js. I get an error however when I try to initiate server.js Does anyone know what I am doing wrong and how to fix it??

The following output is produced when running this file:

-bash-3.2# /usr/src/node-v0.4.6/node /home/colleg60/public_html/development/ajaxim/server/server.js

node.js:134
       throw e; // process.nextTick error, or 'error' event on first tick
       ^
Error: Cannot find module 'tcp'
   at Function._resolveFilename (module.js:320:11)
   at Function._load (module.js:266:25)
   at require (module.js:348:19)
   at Object.<anonymous> (/home/colleg60/public_html/development/ajaxim/server/server.js:32:11)
   at Module._compile (module.js:404:26)
   at Object..js (module.js:410:10)
   at Module.load (module.js:336:31)
   at Function._load (module.js:297:12)
   at Array.<anonymous> (module.js:423:10)
   at EventEmitter._tickCallback (node.js:126:26)
Blender
  • 289,723
  • 53
  • 439
  • 496
JimmyJammed
  • 9,598
  • 19
  • 79
  • 146

1 Answers1

3

Try changing 'tcp' to 'net'

might work.

also in any case you were using the old version of AjaxIM > http://groups.google.com/group/ajaxim/browse_thread/thread/151beb1881f36209 ?

neebz
  • 11,465
  • 7
  • 47
  • 64
  • what file and where can I change tcp to net? – JimmyJammed Apr 21 '11 at 16:52
  • oh and im using AjaxIM v4.0a (the latest version on their site) – JimmyJammed Apr 21 '11 at 16:54
  • and what's your node version? `node -v` ? – neebz Apr 21 '11 at 17:26
  • I did try changing 'tcp' to 'net' but still got an error... any other suggestions? I really want to get this module working on my site! – JimmyJammed Apr 22 '11 at 00:22
  • Ok I think I am close. I finally got it to run server.js after a fresh installation with my own root login and pass. But now I get this error when I attempt to run the command 'node server.js' in my ajaxim/server directory: FATAL ERROR: v8::Debug::SetDebugMessageDispatchHandler V8 is no longer usable Any suggestions? – JimmyJammed Apr 23 '11 at 07:55
  • it might sound annoying but somehow your node installation has failed. Can you try installing it again? V8 comes with node when you install it but now apparently V8 is corrupted. Are you working on windows? – neebz Apr 23 '11 at 08:09
  • just did a reinstall and now I am getting the 'cannot find tcp module' error again...ugh! thanks for your help so far.. any other suggestions? – JimmyJammed Apr 23 '11 at 21:12
  • Yeah I will give it another installation and see if it works. I am on a mac using terminal to connect to the root of my vps (inmotionhosting.com). My VPS Stats: Apache 2.2.17, PHP 5.2.17, Linux x86_64, Perl 5.8.8. This is the instructions I am following: http://stackoverflow.com/questions/4227831/install-node-js-on-powervps – JimmyJammed Apr 23 '11 at 22:34
  • Did you replace 'tcp' with 'net' ? tcp module is apparently not supported anymore. – neebz Apr 26 '11 at 06:13
  • Yes. In the server.js file I replaced tcp (3 instances found) with net. When I run it (node server.js) it just hangs forever.... Seen that before? – JimmyJammed Apr 26 '11 at 19:08