Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install node.js modules in eclipse

I am trying to develop a chat app with node.js and socket.io in an eclipse environment. I have installed node.js in eclipse but I don't know how to install node modules such as expresss, socket io, etc.

Please anyone tell me how to setup node modules in an eclipse environment.

like image 255
Sashi Avatar asked Mar 16 '13 07:03

Sashi


People also ask

How do I install Node JS modules?

In order to use Node. js core or NPM modules, you first need to import it using require() function as shown below. var module = require('module_name'); As per above syntax, specify the module name in the require() function.

Does Eclipse support NodeJS?

As of Eclipse Neon (May 2016), Supports for Node. js comes as part of the JSDT. The only prereqs are the installation of Node. js and npm.

Where should I install node modules?

On Unix systems they are normally placed in /usr/local/lib/node or /usr/local/lib/node_modules when installed globally. If you set the NODE_PATH environment variable to this path, the modules can be found by node.


1 Answers

I dont think that there is an eclipse integrated way to do this. My suggestion is that you download node.js+npm from http://nodejs.org/download/ and then open up a terminal/cmd and in your node.js project directory do "npm install myPackage"

like image 77
unzoomed Avatar answered Oct 02 '22 23:10

unzoomed