| title | Troubleshooting | |||||
|---|---|---|---|---|---|---|
| description | Comprehensive guide to diagnosing and resolving common issues with setup, API, runtime, performance, development, and build | |||||
| category | Support | |||||
| version | 1.0.0 | |||||
| last_updated | 2026-04-10 | |||||
| autor | Troubleshooting | |||||
| audience | all | |||||
| related_pages |
|
|||||
| tags |
|
This guide helps you resolve common issues with PromptBasic IDE. If you can't find a solution here, check the FAQ or create an issue on GitHub.
Symptoms:
- Installation hangs or fails
- Permission errors
- Network timeouts
Solutions:
-
Clear npm cache:
npm cache clean --force npm install
-
Use different registry:
npm config set registry https://registry.npmjs.org/ npm install -
Check Node.js version:
node --version # Should be 16+ npm --version # Should be 8+
-
Permission issues on macOS/Linux:
sudo chown -R $(whoami) ~/.npm npm install
-
Use Yarn as alternative:
npm install -g yarn yarn install
Symptoms:
npm run devfails- Port already in use
- Missing dependencies
Solutions:
-
Check port availability:
lsof -i :3000 # Check if port 3000 is in use lsof -i :3001 # Check if port 3001 is in use
-
Kill process using port:
kill -9 <PID> # Replace <PID> with actual process ID
-
Use different port:
npm run dev -- --port 3002
-
Check environment variables:
echo $ANTHROPIC_API_KEY # Should not be empty
Symptoms:
- Application starts but prompts don't work
- Console shows API key error
- Backend server logs show authentication failure
Solutions:
-
Create
.envfile:touch .env echo "ANTHROPIC_API_KEY=sk-ant-your-key-here" > .env
-
Get API key from Anthropic:
- Visit https://console.anthropic.com/
- Create account if needed
- Generate new API key
- Copy the full key (starts with
sk-ant-)
-
Restart the server:
# Stop with Ctrl+C, then restart npm run dev -
Check key format:
- Should start with
sk-ant- - No extra spaces or characters
- Full key, not truncated
- Should start with
Symptoms:
- API calls return 401 errors
- Console shows auth errors
Solutions:
-
Verify key is correct:
- Check Anthropic console for active keys
- Regenerate if compromised
- Ensure no typos
-
Check key permissions:
- API key must have access to Claude API
- Check account has credits
-
Environment variable issues:
# On macOS/Linux export ANTHROPIC_API_KEY=sk-ant-your-key-here # On Windows set ANTHROPIC_API_KEY=sk-ant-your-key-here
Symptoms:
- HTTP 429 errors
- "Too many requests" messages
- Intermittent failures
Solutions:
-
Reduce request frequency:
- Add delays between prompts
- Implement exponential backoff
-
Check usage limits:
- Visit Anthropic console for usage stats
- Upgrade plan if needed
-
Implement retry logic:
// Example retry function async function retryWithBackoff(fn, maxRetries = 3) { for (let i = 0; i < maxRetries; i++) { try { return await fn(); } catch (error) { if (error.response?.status === 429) { const delay = Math.pow(2, i) * 1000; // Exponential backoff await new Promise(resolve => setTimeout(resolve, delay)); continue; } throw error; } } }
Symptoms:
- Clicking Run does nothing
- Generated code doesn't match expectations
- JavaScript errors in console
Solutions:
-
Check prompt clarity:
- Be specific about controls and actions
- Use exact control names
- Break complex logic into steps
-
Example improvements:
// Bad "Make the button do something" // Good "When btnSubmit is clicked, change lblStatus text to 'Processing...'"
-
Check control references:
- Ensure control IDs match exactly
- Verify controls exist on the form
- Check for typos in names
-
Debug generated code:
- Open browser Developer Tools (F12)
- Check Console tab for errors
- Examine generated JavaScript
Symptoms:
- Controls don't react to clicks
- Visual feedback missing
- Event handlers not firing
Solutions:
-
Verify control setup:
- Check control is properly positioned
- Ensure control has valid properties
- Confirm control is enabled
-
Check event handler attachment:
- Verify prompts are saved
- Ensure Run button was clicked
- Check for JavaScript errors
-
Browser compatibility:
- Test in different browsers
- Ensure modern browser (Chrome 90+, Firefox 88+, Safari 14+)
- Disable browser extensions that might interfere
Symptoms:
- Controls overlap or misalign
- Canvas doesn't respond to drag/drop
- Visual glitches
Solutions:
-
Refresh the application:
- Hard refresh with Ctrl+F5 (or Cmd+Shift+R on Mac)
- Clear browser cache
-
Check canvas size:
- Ensure browser window is large enough
- Try resizing the window
-
Control positioning:
- Use grid snap for alignment
- Check z-index for overlapping controls
- Verify control dimensions
Symptoms:
- Long delays when running prompts
- UI becomes unresponsive
- High CPU/memory usage
Solutions:
-
Reduce complexity:
- Simplify prompts
- Remove unnecessary controls
- Break large applications into smaller parts
-
Optimize prompts:
// Instead of complex prompts, use multiple simple ones "Validate email format" "If valid, show success message" "If invalid, show error message"
-
Browser performance:
- Close other browser tabs
- Update to latest browser version
- Check for memory leaks in DevTools
Symptoms:
- Long wait times for code generation
- Timeouts on API calls
Solutions:
-
Check internet connection:
- Stable broadband recommended
- Avoid public WiFi with restrictions
-
API service status:
- Check Anthropic status page
- Try again during off-peak hours
-
Optimize prompt length:
- Shorter prompts = faster responses
- Remove unnecessary context
Symptoms:
npm run builderrors- Production bundle issues
Solutions:
-
Clean build:
rm -rf dist node_modules/.vite npm install npm run build
-
Check dependencies:
npm audit npm audit fix
-
Environment variables:
- Ensure production env vars are set
- Check build configuration
Symptoms:
- Git commands fail
- Merge conflicts
- File permission issues
Solutions:
-
Check git status:
git status git diff
-
Resolve conflicts:
git add <resolved-file> git commit
-
Permission issues:
# On Windows git config core.filemode false # On macOS/Linux chmod 644 <file>
Add to your .env file:
DEBUG=promptbasic:*
NODE_ENV=development
- Open DevTools: Press F12 or right-click > Inspect
- Check Console: Look for JavaScript errors
- Network tab: Monitor API requests
- Application tab: Check local storage and session data
Run with verbose logging:
DEBUG=* npm run devcurl -X POST http://localhost:3001/api/health
curl -X POST http://localhost:3001/api/messages \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"test"}]}'If these solutions don't work:
-
Gather information:
- Browser and OS version
- Node.js and npm versions
- Full error messages
- Steps to reproduce
-
Check existing issues:
- Search GitHub issues
- Look for similar problems
-
Create new issue:
- Use the bug report template
- Include all relevant information
- Attach screenshots if applicable
-
Community support:
- Join GitHub Discussions
- Ask in relevant forums
- Keep dependencies updated:
npm update - Use version control for all changes
- Test in multiple browsers
- Monitor API usage and costs
- Backup your work regularly
- Document custom modifications