写服务的时候发现重载插件的时候报警告
此服务依赖database但已经声明(不知道是不是这样声明的)
虽然未测试出影响功能的问题,但还是希望可以解决此报错
第一次写服务,还请大佬指点
inject声明:
报警告位置(this.database = ctx.database
):
警告日志:
[W] app Error: property database is not registered, declare it as `inject` to suppress this warning
at mail (D:\koishi\koishi-app\external\mail\src\index.ts:50:25)
at MainScope.apply (D:\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:365:24)
at <anonymous> (D:\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:389:49)
at MainScope.ensure (D:\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:150:18)
at MainScope.start (D:\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:389:12)
at MainScope.init (D:\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:189:12)
at MainScope (D:\koishi\koishi-app\node_modules\@cordisjs\core\src\scope.ts:327:12)
at Proxy.plugin (D:\koishi\koishi-app\node_modules\@cordisjs\core\src\registry.ts:189:15)
at Watcher.triggerLocalReload (D:\koishi\koishi-app\node_modules\@koishijs\plugin-hmr\src\index.ts:298:39)