Closed Nietzen closed 5 years ago
@Nietzen Can you please provide me your app.yml
file?
Hey @zazoomauro sure: app.yml:
services:
app.mailer:
class: ../../service/MailService
MailsService.js:
module.exports = class MailService {
send() {
console.log('Hola Mundo');
}
}
@Nietzen the error is in your MailsService.js file
module.exports.default = class MailService {
send() {
console.log('Hola Mundo');
}
}
the difference is module.exports.default
instead of module.exports
Hey @zazoomauro
I review the code how you load the class from yaml file and notice what you load the class from export.default, i been do a module.exports = class, but the code expected a exports.default = class.
Please fix the documentation.
// good exports.default = class MailService { send() { console.log('hi world!'); }
constructor() {} };
// bad exports = class MailService { send() { console.log('hi world!'); }
constructor() {} };
My documentation says
export default class ...
as ES6 way
I have the next error: