DesertsP / Valine-Admin

🔥A simple comment system based on LeanCloud and Valine.
https://deserts.io/valine-admin-document/
MIT License
715 stars 471 forks source link

PARENT_NICK is not defined #114

Closed suyin-long closed 4 years ago

suyin-long commented 4 years ago

配置完成后,经测试发现别人给我评论时我收不到邮件提醒,但是我给别人回复时别人可以收到邮件提醒! 查看日志后发现报错代码如下:

[2020-07-31T01:24:38.523449900Z][instance:web1] LeanEngine: /Comment/afterSave: 500: ReferenceError: PARENT_NICK is not defined
[2020-07-31T01:24:38.523537400Z][instance:web1]     at eval (eval at exports.notice (/home/leanengine/app/utilities/send-mail.js:40:24), <anonymous>:1:374)
[2020-07-31T01:24:38.523570400Z][instance:web1]     at Object.exports.notice (/home/leanengine/app/utilities/send-mail.js:40:24)
[2020-07-31T01:24:38.523582000Z][instance:web1]     at sendNotification (/home/leanengine/app/cloud.js:10:14)
[2020-07-31T01:24:38.523592000Z][instance:web1]     at /home/leanengine/app/cloud.js:44:12
[2020-07-31T01:24:38.523600600Z][instance:web1]     at /home/leanengine/app/node_modules/leanengine/lib/leanengine.js:356:23
[2020-07-31T01:24:38.523609900Z][instance:web1]     at new Promise (<anonymous>)
[2020-07-31T01:24:38.523619000Z][instance:web1]     at promiseTry (/home/leanengine/app/node_modules/leanengine/lib/leanengine.js:354:10)
[2020-07-31T01:24:38.523628000Z][instance:web1]     at /home/leanengine/app/node_modules/leanengine/lib/leanengine.js:249:7
[2020-07-31T01:24:38.523637500Z][instance:web1]     at new Promise (<anonymous>)
[2020-07-31T01:24:38.523646200Z][instance:web1]     at callClassHook (/home/leanengine/app/node_modules/leanengine/lib/leanengine.js:237:10)
[2020-07-31T01:24:38.523655200Z][instance:web1]     at /home/leanengine/app/node_modules/leanengine/lib/leanengine.js:104:16
[2020-07-31T01:24:38.523664400Z][instance:web1]     at /home/leanengine/app/node_modules/leanengine/lib/leanengine.js:356:23
[2020-07-31T01:24:38.523673300Z][instance:web1]     at new Promise (<anonymous>)
[2020-07-31T01:24:38.523682300Z][instance:web1]     at promiseTry (/home/leanengine/app/node_modules/leanengine/lib/leanengine.js:354:10)
[2020-07-31T01:24:38.523691500Z][instance:web1]     at /home/leanengine/app/node_modules/leanengine/lib/leanengine.js:86:5
[2020-07-31T01:24:38.523700200Z][instance:web1]     at call (/home/leanengine/app/node_modules/connect/index.js:239:7)
[2020-07-31T01:24:45.043415600Z][instance:web1] (node:34) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

我试着在环境变量里添加PARENT_NICK变量后依旧报错,不知道该怎么弄。 请问这个问题该怎么解决?希望给出解决方案,谢谢! ps:我使用的是Next主题

suyin-long commented 4 years ago

已解决! 经测试我发现是我把变量MAIL_TEMPLATE_ADMIN的值填错了!修改过来即可!