I have a Nodeclipse project x, which can be considered as a library, in the form of javascript files. It has a root folder: 'r'. This folder has an 'index.js' file.
A typical module using x starts by: var r = require('r');.
This works well when running Node.js from the cmd line by simply adding the full path to 'r' to NODE_PATH.
Now in another Nodeclipse project y, I add project x as a reference in the 'projects' tab of the 'Include path' properties.
I am expecting that Nodeclipse will do the magic of adding the source folders of x to the include paths of y when running the project. If not what's the use of adding a project?.
However, when hitting: var r = require('r');, Node.js complains it can't find 'r'. Stepping into the source code for 'require', it is obvious that none of the source paths of project 'x' have been added to the include path.
What am I missing?
This is actually Node.js general question, and I just added
node.jstag.In short you should do it Node.js way, not Eclipse way.
That is what you get used to using Eclipse JDT for Java.
For Node.js it should work without any IDE also:
from project x do
then in project y
Other way it to
require(path/to/project_x)or in project y
Just learn Node.js, Eclipse and of course Nodeclipse :)
Nodeclipse "Enide Studio 2014" plugins have integrated terminal: