requires module file in same directory but reports error

There are 2 javascript files a.js b.js in same directory

b.js

module.exports = function(app) {
    return new B(app);
};


var B = function(app) {



};

a.js

var configCouchbase = require('b.js')();

but it reports

Caught exception: Error: Cannot find module 'b.js'

Your comment welcome

you need to do require('./b.js') - otherwise it looks module in ./node_modules/b.js ( and if not found - in ../node_modules/b.js etc)