Loading...
Loading...
Debug and auto-fix Vite projects running inside WebContainers: resolve mount/root issues, alias/path errors, missing scripts, and other common dev-time problems so the app boots cleanly.
npx skill4agent add tippyentertainment/skills vite-webcontainer-developerpnpm devvitepnpmnpmyarndevstartindex.htmlsrc/main.tsx.tsx.jsxpackage.webcontainer.jsonpnpm-workspace.yaml<div id="...">document.getElementById("...")index.htmlindex.html@/lib/utilsnode scripts/extractFilesFromMarkdown.tssyncToWebContainernode scripts/recover-and-start.jspnpm devsrc/lib/utils.tscn// src/lib/utils.ts
export function cn(...classes: Array<string | false | null | undefined>) {
return classes.filter(Boolean).join(' ');
} - Ensure `vite.config.*` has the alias configured:
- `resolve: { alias: { '@': path.resolve(__dirname, 'src') } }`
- Ensure `tsconfig.json` or `jsconfig.json` has the matching path map:
- `"baseUrl": ".", "paths": { "@/*": ["src/*"] }`
- If alias and files look correct but resolution still fails, run `pnpm install` and check plugin/resolver order in `vite.config` (some plugin orderings affect alias resolution).
- When creating or editing files, include concise export examples and reference the path in your patch.
- Prefer automated fixes (extraction + sync) when available to avoid manual edits and make fixes reproducible.pnpm startnpm start"dev": "vite""start": "vite --host""start": "npm run dev"starttype: "module"postcss.config.jsvite.config.js.cjspackage.webcontainer.jsonpackage.jsonpackage.webcontainer.jsononlyBuiltDependenciespnpm-workspace.yamlpnpmnpx tsc --noEmitpnpm run buildnpx vite build --silentscripts/check-imports.jscheck-importsnpm run check-importspre-pushtemplates/src/lib/utils.tsnpm run check-importsQuick reviewer checklist: ensurepasses locally or CI is green before merging. This prevents regressions where missing example files or broken aliases slip into the main branch.check-imports