How to setup Node.js + Eclipse + TypeScript correctly?

Just started to warm up with Node.js + Eclipse + TypeScript and already banging my head for a few days. Here's a code of my Server.ts file which I used from node.js website (just added reference path at the top):

/// <reference path="node.d.ts" />

var http = require('http');

http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, '127.0.0.1');

console.log('Server running at http://127.0.0.1:1337/');

The problem is, if I don't use reference path at the bottom and use node.d.ts file then it shows "Cannot find name require" where I'm including http module. But if I use node.d.ts and reference it then it shows a bunch of errors inside node.d.ts ():

import events = require("events"); // shows no such file or directory events.ts
import net = require("net"); // shows no such file or directory net.ts

Indeed there are no such files, and even they would they should be js files not ts (imho). Anyway, executing "tsc -v" shows me I'm using TypeScript 1.3 version. After googling I found and used this node.d.ts file for my TypeScript 1.3. However it looks like it's wrong file or I'm missing some point.

I'm still a confused a lot about these *.d.ts files. My eclipse project has generated a reference to some lib.d.ts but it doesn't help if I try to reference it instead of manual node.d.ts file. Why we need them for even fundamental commands like require? And of course, any help would be appreciated :)

Update here's a screenshot about node.d.ts complains:

enter image description here

Update2 Finally, I understood :) It appears TypeScript itself knowns nothing about special javascript things that are present on Node.js (these features are not present in regular browser javascript). That's why TypeScript compilers complains about require which is Node.js specific stuff. Therefore we need some bridging definition for TypeScript compiler about Node.js specific things. Therefore we need to include node.d.ts. The same we need to do for other javascript frameworks or libs in order to be able to use them in TypeScript. The question remains why Eclipse complains about my node.d.ts file...

Update3. I'v installed Enide Studio 2014 plugin for node which includes Typecs plugin on my work's computer (Maverics). Here's my installed plugin list for Eclipse:

enter image description here

Now I noticed there no Enide plugin and I remember its installation took quite a long yesterday, therefore thanks to @SteveFenton spot, it may be a problem. Today started to install Enide plugin again and here's a screen shot of installation process:

enter image description here

The same installation was successful on the same Eclipse version (Luna) on my Yosemite mac at home.

You should be able to use import rather than var:

/// <reference path="node.d.ts" />

//var http = require('http');
import http = require('http');

This will work even though http isn't a file. Everything in node.d.ts should be avaalble in this way. If you are using other node stuff, like express, you'll need additional .d.ts files.

Thanks to @SteveFenton, I was able to spot my own silly mistake. It's just I'v not worked with Eclipse a lot and because of that I didn't notified Enida for node plugin was not fully installed. Here are the screenshot which I'v got. Still need to investigate why it didn't installed correctly.

enter image description here

Here are the errors:

enter image description here