## Node.js 依赖安装(Windows) huashu-data-pro skill 的 PPT 生成和 HTML 渲染依赖 Node.js。 ### Step 1: 安装 Node.js 18+ 如果还没装: 1. 访问 https://nodejs.org/zh-cn/download 2. 下载 Windows Installer (.msi) - LTS 版本 3. 一路 Next 安装 4. 验证:PowerShell 里跑: ```powershell node --version npm --version ``` ### Step 2: 进入 skill 目录安装依赖 打开 PowerShell,cd 到 huashu-data-pro 的 scripts 目录: ```powershell cd 路径\到\skills\huashu-data-pro\scripts npm install ``` 这一步会装 playwright、pptxgenjs、sharp 三个包。playwright 体积较大(500MB+),首次安装慢,用国内镜像加速: ```powershell npm config set registry https://registry.npmmirror.com npm install ``` ### Step 3: 装完后还要装 Chromium(playwright 需要) ```powershell npx playwright install chromium ``` ### Step 4: 验证 ```powershell node -e "require('pptxgenjs'); require('playwright'); console.log('OK')" ``` 输出 `OK` 即可。 ### 用途说明 - `playwright`:HTML 报告 → PNG 截图(PPT 内嵌图用) - `pptxgenjs`:生成 PPTX 文件 - `sharp`:图片处理(尺寸/格式转换) ### 如果你不打算演示 PPT 生成,可以跳过 Node 这步 skill 的 HTML 报告和 Excel 报告都是纯 Python 跑的,**只有 PPT 报告需要 Node**。 如果录制时只演示 HTML + Excel 双格式,可以省掉 Node 安装环节。