I'm having a small issue with node and calling a local class in another file from app.js,
modules.export = bar;
var foo = require('./foo');
var fooClass = new bar();
Also check how you're importing. When you use
var foo = require('./foo');, you must also use
var fooClass = new foo(). The local variable / class will match the name you gave it when you
required it, not the name you gave it when you defined it in the original file.
For example, the following would also work:
var Bar = require('./foo'); var bar = new Bar();
You can label your variables whatever you want when you import / require them, regardless of their names when you declare them -- including classes.