Quality & Evaluation
Understanding Errors
Things don't always work perfectly on the first try. Webase helps you identify and fix errors quickly, whether they come from the bundling process, runtime behavior, or common coding issues.
Types of Errors
There are two main categories of errors you might encounter:
Bundle Errors
Bundle errors occur when the client-side bundler can't compile your app's source files. Common causes include:
- Syntax errors — Missing brackets, unclosed strings, or invalid JSX.
- Import errors — Importing a file or module that doesn't exist.
- Type errors — TypeScript type mismatches (in
.tsxfiles). - Missing entry point — The bundler can't find a valid entry file like
src/index.tsx.
When a bundle error occurs, the Preview tab shows We hit a snag building your preview in place of your app. Click Show technical details to see the error, with file names and line numbers. You can't publish until the latest draft builds.
Runtime Errors
Runtime errors happen after the app successfully bundles but encounters a problem while running. These include:
- Undefined variables — Accessing a value that hasn't been defined.
- Null reference errors — Trying to read a property of null or undefined.
- API errors — Failed data fetches, incorrect API URLs, or malformed requests.
- React rendering errors — Component crashes, infinite loops, or state management issues.
How Webase Fixes Errors
Webase watches the preview for both kinds of error and tries to fix them for you.
It Fixes Errors on Its Own
When the preview fails to build, or the running app reports an error, Webase checks the files for syntax errors and missing imports, then sends what it found to the AI to fix. The chat shows each step, such as Bundle failed. Diagnosing errors (attempt 1/2)..., and the preview shows Working on a fix. It tries up to 2 times.
Or You Ask It To
If the automatic attempts don't work, the preview shows two buttons. Auto-Fix starts a fresh round of attempts. Diagnose lists syntax errors and unresolved imports by file and line, under Show technical details, without changing anything.
Or You Fix It Yourself
Describe the problem in the chat, or paste the error. Or open the file in the Code tab and fix it by hand. If a recent change caused the error, restoring the version before it is often fastest. See Versions & Undo.
Fixes are changes like any other: each one is a new version, and the preview rebuilds when it's done.
Common Issues and Solutions
- "Cannot find module" — A file import path is wrong. The AI may have created a file in a different location than expected. Ask the AI to fix the import.
- "X is not a function" — A value is being called as a function but isn't one. Often caused by incorrect imports or outdated references.
- Blank preview — The app bundled but nothing renders. Usually a problem in the entry point file or the root component. Ask the AI: "The preview is blank, can you check the entry point?"
- Infinite loading — The app renders but never finishes loading data. Often caused by an infinite re-render loop or a data fetch that never resolves.
- Styles not applying — Tailwind classes not working usually means a class name typo or a missing Tailwind config extension.
Debugging Tips
Use the Test button. Test, in the editor's header, has an AI reviewer read your code against what you asked for. It catches missing features and likely runtime problems, and fixes what fails. See Testing Your App.
- Be specific when reporting errors. Instead of "it's broken," tell the AI exactly what's happening: "Clicking the Save button throws an error about undefined property 'name'."
- Check the Code tab. Sometimes a quick look at the source file where the error occurs can reveal an obvious issue you can fix directly.
- Try one fix at a time. If multiple things are broken, address them one at a time so you can verify each fix independently.