So I have some node.js files
/folder/app.js
/folder/node_modules/moduleIwanttoload
/folder/subfolder/file.js
how do I require moduleIwanttoload from file.js?
you can use subfolder files like this into app.js
var file = require('./subfolder/file.js');
and in the folder of node-modules you can just use it like
var moduleIwanttoload = require("moduleIwanttoload");
If the module you want to load is a dependency contained in "node_modules" you can simply use
require("moduleIwanttoload")
Node JS will trace the directory tree down to the first folder in which it finds a "node_modules" directory and looks for the given dependency in it.