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')}`)