Closed lgupta54 closed 6 years ago
following is my code:
let template = fs.readFileSync('../api/mailTemplate/emailVerification.hjs', 'utf-8');
let compiledTemplate = Hogan.compile(template);
compiledTemplate.render({link: link, name:name})
Error: TypeError: Cannot read property 'render' of undefined
Above code is working fine in debug mode of app, but gives the error in run mode.
Node.js
following is my code:
let template = fs.readFileSync('../api/mailTemplate/emailVerification.hjs', 'utf-8');
let compiledTemplate = Hogan.compile(template);
compiledTemplate.render({link: link, name:name})
Error: TypeError: Cannot read property 'render' of undefined
Above code is working fine in debug mode of app, but gives the error in run mode.
Node.js