npx skills add https://github.com/wix/skills --skill wix-cli-app-validation通过一个四步顺序工作流验证 Wix CLI 应用:包安装、TypeScript 编译检查、构建和预览。
按顺序执行这些步骤。如果任何步骤失败,则停止并报告错误。
确保所有依赖项在开始构建之前已安装。
检测包管理器:
package-lock.json → 使用 npmyarn.lock → 使用 yarnpnpm-lock.yaml → 使用 pnpmnpm运行安装命令:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# For npm
npm install
# For yarn
yarn install
# For pnpm
pnpm install
成功标准:
node_modules 目录存在并包含预期的包失败时: 报告安装错误,检查调试日志以获取详细诊断信息,并停止验证。常见问题:
运行 TypeScript 编译器以检查类型错误。
完整项目检查:
npx tsc --noEmit
针对性检查(特定文件/目录):
在实现特定扩展后进行验证时,可以仅对这些文件运行 TypeScript 检查:
# 检查特定目录
npx tsc --noEmit src/extensions/dashboard/pages/survey/**/*.ts src/extensions/dashboard/pages/survey/**/*.tsx
# 仅检查仪表板页面
npx tsc --noEmit src/extensions/dashboard/pages/**/*.ts src/extensions/dashboard/pages/**/*.tsx
# 仅检查站点小部件
npx tsc --noEmit src/extensions/site/widgets/**/*.ts src/extensions/site/widgets/**/*.tsx
# 仅检查仪表板模态框
npx tsc --noEmit src/extensions/dashboard/modals/**/*.ts src/extensions/dashboard/modals/**/*.tsx
# 仅检查后端
npx tsc --noEmit src/extensions/backend/**/*.ts
何时使用针对性检查:
何时使用完整项目检查:
成功标准:
失败时: 报告具体的 TypeScript 错误并停止验证。常见问题:
运行构建命令并检查编译错误:
npx wix build
成功标准:
失败时: 报告具体的编译错误,检查调试日志以获取详细诊断信息,并停止验证。
启动预览服务器:
npx wix preview
成功标准:
URL 提取: 解析终端输出以找到两个预览 URL。查找类似模式:
Site preview: https://... 或 Site URL: https://...Dashboard preview: https://... 或 Preview URL: https://... 或 Your app is available at: https://...提取两个 URL 并提供给用户进行手动验证。
失败时: 报告预览启动错误,检查调试日志以获取详细诊断信息,并停止验证。
完成所有步骤后,提供摘要:
通过:
失败:
当验证步骤失败时(非零退出代码、错误输出或 CLI 崩溃/挂起),请检查项目根目录中的 .wix/debug.log 以获取完整的错误跟踪。仅在发生错误时读取此文件 — 当步骤通过或终端输出已明确显示错误时(例如,一个简单的 TypeScript 类型错误),请跳过它。
.wix/ 目录由 Wix CLI 自动创建,包含内部配置和日志文件。不要编辑它,但为了故障排除而读取 debug.log 是预期的。
Read: .wix/debug.log
# 如果文件很大,请读取最后 100 行以获取最近的错误
Read: .wix/debug.log (with offset to the end)
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 包安装失败 | 缺少锁文件、网络问题或 node_modules 损坏 | 删除 node_modules 和锁文件,然后重新安装 |
| TypeScript 编译失败 | 类型不匹配、缺少声明或类型不正确 | 修复 npx tsc --noEmit 输出中显示的 TypeScript 错误 |
| 构建失败 | TypeScript 错误、缺少依赖项或内部 CLI 错误 | 修复源代码中的 TypeScript 错误;对于不明显的问题,请检查 .wix/debug.log |
| 预览启动失败 | 端口冲突、配置问题或内部 CLI 错误 | 检查 wix.config.json;如果不清楚,请检查 .wix/debug.log 以获取详细信息 |
| 预览中出现控制台错误 | 运行时异常 | 检查浏览器控制台输出 |
| UI 未渲染 | 组件错误 | 检查组件代码和导入 |
| CLI 错误但无明确消息 | 终端输出被截断 | 读取 .wix/debug.log 以获取完整的错误跟踪和堆栈详细信息 |
| 配置更改后出现神秘故障 | CLI 状态陈旧 | 读取 .wix/debug.log 以确认,然后删除 .wix/ 并重新构建 |
每周安装量
195
仓库
GitHub 星标数
3
首次出现
2026 年 1 月 26 日
安全审计
安装于
opencode173
cursor95
codex90
gemini-cli88
github-copilot84
amp79
Validates Wix CLI applications through a four-step sequential workflow: package installation, TypeScript compilation check, build, and preview.
Execute these steps sequentially. Stop and report errors if any step fails.
Ensure all dependencies are installed before proceeding with the build.
Detect package manager:
package-lock.json → use npmyarn.lock → use yarnpnpm-lock.yaml → use pnpmnpm if no lock file is foundRun installation command:
# For npm
npm install
# For yarn
yarn install
# For pnpm
pnpm install
Success criteria:
node_modules directory exists and contains expected packagesOn failure: Report the installation errors, check the debug log for detailed diagnostics, and stop validation. Common issues:
Run TypeScript compiler to check for type errors.
Full project check:
npx tsc --noEmit
Targeted check (specific files/directories):
When validating after implementing a specific extension, you can run TypeScript checks on just those files:
# Check specific directory
npx tsc --noEmit src/extensions/dashboard/pages/survey/**/*.ts src/extensions/dashboard/pages/survey/**/*.tsx
# Check dashboard pages only
npx tsc --noEmit src/extensions/dashboard/pages/**/*.ts src/extensions/dashboard/pages/**/*.tsx
# Check site widgets only
npx tsc --noEmit src/extensions/site/widgets/**/*.ts src/extensions/site/widgets/**/*.tsx
# Check dashboard modals only
npx tsc --noEmit src/extensions/dashboard/modals/**/*.ts src/extensions/dashboard/modals/**/*.tsx
# Check backend only
npx tsc --noEmit src/extensions/backend/**/*.ts
When to use targeted checks:
When to use full project check:
Success criteria:
On failure: Report the specific TypeScript errors and stop validation. Common issues:
Run the build command and check for compilation errors:
npx wix build
Success criteria:
On failure: Report the specific compilation errors, check the debug log for detailed diagnostics, and stop validation.
Start the preview server:
npx wix preview
Success criteria:
URL extraction: Parse the terminal output to find both preview URLs. Look for patterns like:
Site preview: https://... or Site URL: https://...Dashboard preview: https://... or Preview URL: https://... or Your app is available at: https://...Extract both URLs and provide them to the user for manual verification.
On failure: Report the preview startup errors, check the debug log for detailed diagnostics, and stop validation.
After completing all steps, provide a summary:
Pass:
Fail:
When a validation step fails (non-zero exit code, error output, or the CLI crashes/hangs), check .wix/debug.log in the project root for the full error trace. Only read this file when errors occur — skip it when steps pass or when the terminal output already makes the error clear (e.g. a straightforward TypeScript type error).
The .wix/ directory is automatically created by the Wix CLI and contains internal configuration and log files. Don't edit it, but reading debug.log for troubleshooting is expected.
Read: .wix/debug.log
# If the file is large, read the last 100 lines for the most recent errors
Read: .wix/debug.log (with offset to the end)
| Issue | Cause | Solution |
|---|---|---|
| Package installation fails | Missing lock file, network issues, or corrupted node_modules | Delete node_modules and lock file, then reinstall |
| TypeScript compilation fails | Type mismatches, missing declarations, or incorrect types | Fix TypeScript errors shown in npx tsc --noEmit output |
| Build fails | TypeScript errors, missing dependencies, or internal CLI error | Fix TypeScript errors in source; for non-obvious failures, check .wix/debug.log |
| Preview fails to start | Port conflict, config issue, or internal CLI error | Check wix.config.json; if unclear, check .wix/debug.log for details |
Weekly Installs
195
Repository
GitHub Stars
3
First Seen
Jan 26, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode173
cursor95
codex90
gemini-cli88
github-copilot84
amp79
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
31,600 周安装
| Console errors in preview | Runtime exceptions | Check browser console output |
| UI not rendering | Component errors | Review component code and imports |
| CLI error with no clear message | Truncated terminal output | Read .wix/debug.log for the full error trace and stack details |
| Mysterious failures after config change | Stale CLI state | Read .wix/debug.log to confirm, then delete .wix/ and rebuild |