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.
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.
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.
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.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With