I installed package resource-bundle in my project and now to use it in my main.js:
/*main.js*/
var co=require('co');
var loader = require('resource-bundle');
co(function*(){
...
...
}).catch(onerror);
And this is in the index.js of resource-bundle package:
/*index.js*/
module.exports = function*(locale, dir, baseName) {
...
...
...
}
It gets this error:
Cannot assign to read only property 'exports' of object '#<Object>'
What's the problem?
Why your module.exports is a function?
It should be Object Literal like this:
}