require('../utils/email-utils.js')
should normally work, because that's the correct location.
However, apparently CompoundJS does something funky, since it's running your code using eval
, which makes the require relative to some path from within the CompoundJS module itself (reading the CompoundJS docs, it's because you're using eval controllers
).
I think it's best resolved by adjusting the NODE_PATH
environment variable so it includes your base directory (compoundApp
). That way, require('app/utils/email-utils')
should work (although I'm not familiar with the intricacies of Node environment variables on Windows).