Install node.js modules in eclipse
From https://groups.google.com/forum/#!topic/nodeclipse/FgUci2ZXpoQ
- Double-click package.json on the Package Explorer to open it.
- Add into dependencies section what you want to install, and save it.
- Select package.json on the Package Explorer, open context menu by right-clicking, and select [Run As]-[npm install] menu.
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"
You mention installing express, but you don't need to install that if you're using nodeclipse.
to generate an express project: Select the File-New-Project menu. Select Node-Express Project, and select Next button. Enter Project name and select Finish button.
I'm running Eclipse Mars... Here is how I did it...
- Install Nodeclipse from eclipse marketplace http://www.nodeclipse.org/
- Create a new node.js express project, File -> New Node.Js Express Project
- Open the package.json file
- Add my npm package to the package.json as a dependency (copy the format for the express dependency)
- Save the package.json (seems obvious but it got me when testing!)
- Right click the package.json, Run As -> NPM Install
- Right click the eclipse project folder, Refresh
- Open node_modules... BOOM! You will see your new module installed in eclipse