This guide helps you resolve common issues that may arise while using the Visual Regression Testing tool.
Symptoms:
- Build errors
- Runtime errors related to Node.js features
Solutions:
- Ensure Node.js 20 or higher is installed:
node --version
- If using nvm, switch to Node.js 20:
nvm install 20 nvm use 20
- Update npm if needed:
npm install -g npm@latest
Symptoms:
- Type errors during build
- Module resolution errors
Solutions:
- Clear node_modules and reinstall:
rm -rf node_modules package-lock.json npm install
- Rebuild TypeScript:
npm run build
- Check TypeScript version compatibility:
npx tsc --version
Symptoms:
- Playwright browser installation failures
- Browser not found errors
- Stagehand unable to launch browser
Solutions:
- Install Playwright browsers (required by Stagehand):
npx playwright install --with-deps chromium
- If on Linux, ensure system dependencies are installed:
npx playwright install-deps chromium
- If you already have a system Chrome/Chromium binary, you can also point Bruni at it with:
export CHROME_PATH=/absolute/path/to/chrome - Note: The app uses Stagehand for browser automation, which requires a resolvable Chromium/Chrome executable. The Vercel MCP app uses
@sparticuz/chromiuminstead of bundling Playwright's browser binaries.
Symptoms:
Cannot find moduleerrors- Import errors
Solutions:
- Ensure the project is built:
npm run build
- Check that you're running from the correct directory
- Verify dist/ directory exists and contains compiled files
Symptoms:
- Missing API key errors
- Configuration not found
Solutions:
- Ensure
.envfile exists in the root directory - Check that
.envcontains required variables:OPENAI_API_KEY=your_key_here GITHUB_TOKEN=your_token_here - Verify environment variables are set when running:
echo $OPENAI_API_KEY
Symptoms:
- Missing PR comments
- Authentication errors
Solutions:
- Verify
GITHUB_TOKENis set correctly - Check token has
pull-requests: writepermission - Ensure
GITHUB_REPOSITORYenvironment variable is set (format:owner/repo) - Verify PR number is accessible (check
PR_NUMBERenv var or GitHub event)
-
Check Logs
- Review console output
- Check error messages
- Look for stack traces
- Enable verbose logging if available
-
Verify Environment
node --version # Should be 20 or higher npm --version npx tsc --version # Check TypeScript version
-
Run in Development Mode
For more detailed error messages, run with TypeScript directly:
npm run dev -- --base-url <url> --pr-url <url>
-
Check Build Output
Ensure the TypeScript build completed successfully:
npm run build ls -la dist/
If you encounter issues not covered in this guide:
- Check the Configuration Guide
- Review the Usage Examples
- Consult the project's issue tracker
- Contact the maintainers
Remember to provide:
- Error messages
- Environment details
- Steps to reproduce
- Expected vs actual behavior