error running app after new install on Amazon EC2

For the first time trying to use Amazon EC2 to install node.js server. Doing according to this article. Installed node.js, then npm, then all the other modules. All without error. But for some reason, my server does not start. Can you please tell me where to find the error?

[ec2-user@domU-12-31-39-07-62-87 ~]$ node server.js

module.js:340
    throw err;
          ^
Error: Cannot find module 'socket.io'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/ec2-user/server.js:3:10)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
[ec2-user@domU-12-31-39-07-62-87 ~]$ cd node
[ec2-user@domU-12-31-39-07-62-87 node]$ node server.js

module.js:340
    throw err;
          ^
Error: Cannot find module '/home/ec2-user/node/server.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

It looks like it just couldn't find socket.io. Try this:

cd /home/ec2-user
npm install socket.io
node server.js

I agree with "The Reddest", however, the article says to install express which should install socket.io as a dependency. Did you run the last two npm commands in the article?

sudo npm install express -g
sudo npm install forever -g

Better yet, create a package.json file and install its dependencies local to the app rather than globally. Read more about that, here .. http://docs.nodejitsu.com/articles/getting-started/npm/what-is-the-file-package-json