I have a node file used in express which can not see a required file within a function , but when setting breakpoints, I can see it defined right after the declaration. The other variable, auth
can be seen fine in both places
var auth = require('../utilities/auth');
var index = require('../utilities/index');
// here, i set a break point and index is defined
module.exports = {
create : function (req, res) {
// in here, i set a breakpoint, index is not defined
And I'm pretty sure I have the paths correct. The snippet above is from user.js
a more complete snippet is here . https://gist.github.com/foobar8675/eb5ec78461dff59a80d1
Any suggestions are appreciated!