|
| 1 | +# Developer Troubleshooting |
| 2 | + |
| 3 | +This document contains developer-focused troubleshooting guidance for building, |
| 4 | +running, and contributing to Music Blocks. End users should refer to the main |
| 5 | +README and user documentation. |
| 6 | + |
| 7 | +## Browser Shows Blank Page or Blocks Not Displaying |
| 8 | + |
| 9 | +Problem: |
| 10 | +The application loads but shows a blank screen or blocks do not appear. |
| 11 | + |
| 12 | +Solution: |
| 13 | +1. Open the browser Developer Tools. |
| 14 | + - Chrome / Edge: F12 or Ctrl + Shift + J |
| 15 | + - Firefox: Ctrl + Shift + K |
| 16 | +2. Check the Console tab for JavaScript errors. |
| 17 | +3. Fix the reported errors and reload the page. |
| 18 | +4. Try running the app in Chrome or Firefox if the issue persists. |
| 19 | + |
| 20 | +## npm install Fails with Permission Errors |
| 21 | + |
| 22 | +Problem: |
| 23 | +Dependency installation fails due to permission issues or corrupted files. |
| 24 | + |
| 25 | +Solution: |
| 26 | +Run the following commands from the project root: |
| 27 | + |
| 28 | +rm -rf node_modules package-lock.json |
| 29 | +npm install |
| 30 | + |
| 31 | +On Windows, use PowerShell or Git Bash. |
| 32 | + |
| 33 | +## npm run lint Fails with Formatting Errors |
| 34 | + |
| 35 | +Problem: |
| 36 | +Linting errors block the build due to formatting issues. |
| 37 | + |
| 38 | +Solution: |
| 39 | +Run Prettier first, then re-run lint: |
| 40 | + |
| 41 | +npx prettier --write . |
| 42 | +npm run lint |
| 43 | + |
| 44 | +## Docker Container Won’t Start |
| 45 | + |
| 46 | +Problem: |
| 47 | +Docker build fails or the container does not start correctly. |
| 48 | + |
| 49 | +Solution: |
| 50 | +Clean Docker state and rebuild: |
| 51 | + |
| 52 | +docker system prune |
| 53 | +docker-compose up --build |
| 54 | + |
| 55 | +## Port Already in Use (EADDRINUSE) |
| 56 | + |
| 57 | +Problem: |
| 58 | +The development server fails to start because port 3000 is already in use. |
| 59 | + |
| 60 | +Solution: |
| 61 | +Start the server on a different port: |
| 62 | + |
| 63 | +npm start -- --port=3001 |
| 64 | + |
| 65 | +Then open http://localhost:3001 in your browser. |
| 66 | + |
| 67 | +## No Sound / Audio Not Working |
| 68 | + |
| 69 | +Problem: |
| 70 | +The application runs but produces no sound. |
| 71 | + |
| 72 | +Solution: |
| 73 | +1. Ensure system volume is not muted. |
| 74 | +2. Check browser audio permissions. |
| 75 | +3. Click once anywhere on the page to enable audio playback. |
| 76 | +4. Use a supported browser (Chrome or Firefox recommended). |
| 77 | + |
| 78 | +## Module Not Found Errors |
| 79 | + |
| 80 | +Problem: |
| 81 | +Errors such as "Cannot find module" appear during runtime or build. |
| 82 | + |
| 83 | +Solution: |
| 84 | +Reinstall dependencies: |
| 85 | + |
| 86 | +rm -rf node_modules package-lock.json |
| 87 | +npm install |
| 88 | + |
| 89 | +## Still Having Issues? |
| 90 | + |
| 91 | +If problems persist: |
| 92 | +1. Search existing GitHub issues: |
| 93 | + https://github.com/sugarlabs/musicblocks/issues |
| 94 | +2. Review developer documentation. |
| 95 | +3. Open a new issue with: |
| 96 | + - Error logs |
| 97 | + - Steps to reproduce |
| 98 | + - Browser and OS details |
0 commit comments