From 6c4e20371e7d44e132ea9260bfc464339c8adb7f Mon Sep 17 00:00:00 2001 From: yeyang <746659424@qq.com> Date: Sat, 14 Jan 2023 17:16:56 +0800 Subject: [PATCH] modified: index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index b1ace74..86dfead 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,7 @@ try { await import('systeminformation') await redis.set('yenai:node_modules', '1') } catch (error) { - if (error.stack.includes('Cannot find package')) { + if (error.stack?.includes('Cannot find package')) { logger.warn('--------椰奶依赖缺失--------') logger.warn(`yenai-plugin 缺少依赖将无法使用 ${logger.yellow('椰奶状态')}`) logger.warn(`如需使用请运行:${logger.red('pnpm add systeminformation -w')}`)