已采纳回答 / 落_叶
感觉你这样定义是不对的,Cannot read property 'add' of undefined,你可以试试这样的形式:exports.add = add; 或者 module.exports.add = add;
2017-01-19