Docs: Add Troubleshooting for CONTRIBUTING.md Steps
See original GitHub issueThanks to @Sboonny for moving this over to the CONTRIBUTING.md. See the Troubleshooting section and expand the appropriate topic areas for help with common technical errors and their solutions.
Application Errors
- Problem: JsonWebTokenError: invalid signature – Solution: Clear the browser cookies for the localhost domain, or use an incognito browser window to open the site.
- Problem: Where do application registration and other emails go? – Solution: All email are captured and saved by Mailhog. Simply open http://localhost:8025/ to see captured emails. For account registration, the email validation link can be opened in the browser to complete the registration process.
- The application shows “Something went wrong relation “chapters” does not exist” - Solution: The database needs to be initialized.
- The applications shows "The table
public.chapters
does not exist in the current database." or “Invalid 'prisma_1.prisma.chapters.findMany()” – Solution: The database hasn’t been created. Runnpm run db:reset
to clear and re-create the database tables.
Linux Docker Troubleshooting
-
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
- Run
sudo docker-compose up
or add non-privileged user to the docker group as described in https://docs.docker.com/engine/install/linux-postinstall/ If Docker was run as sudo before adding your user to the docker group - "WARNING: Error loading config file: /home/user/.docker/config.json " see https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
Node / NPM
- Problem: notsup Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”}) - Solution: Upgrade to npm version 7 or 8, like
npm install -g npm@latest
or by getting the latest version of NodeJS from your Linux package manager. Or, install nvm. - Problem: Running npm i gives the error “Module not found: Can’t resolve ‘framer-motion’” - Solution: Upgrade to npm version 7 or 8, like
npm install -g npm@latest
or by getting the latest version of NodeJS from your Linux package manager. Or, install nvm. - Problem:
npm ERR! Error: EACCES: permission denied, rename '/usr/lib/node_modules/npm'
or
Error: EACCES: permission denied, rename '/usr/bin/npm'
Solution: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally or else https://stackoverflow.com/a/51024493
- If using Windows / WSL + Ubuntu Terminal, “npx /bin/sh^M bad interpreter: No such file or directory” likely happens when Node.js is already installed on Windows, but it also needs to be installed within the Linux subsystem / terminal, such as installing it with apt on in Ubuntu.
ElephantSQL
- Error during schema drop: QueryFailedError: must be owner of view pg_stat_statements while running npm run db:reset - Solution: the free tier of ElephantSQL doesn’t allow concurrent connections, so it’s necessary to run database commands one-at-a-time, like npm run db:drop then npm run db:sync and then npm run db:seed. Alternatively, a paid plan on ElephantSQL would avoid this issue. - via https://github.com/freeCodeCamp/chapter/issues/762
General Docker Troubleshooting
- Linux
- Windows
- Mac
- Make sure Docker isn’t already running and bound to port 54320 - ERROR: for chapter-npx-test_db_1 Cannot start service db: driver failed programming external connectivity on endpoint chapter-npx-test_db_1 (…): Bind for 0.0.0.0:54320 failed: port is already allocated. ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint chapter-npx-test_db_1
- To shut down Docker on Linux, press Ctrl + C in the terminal where it was started.
- To purge old images, which can sometimes be the source of errors, run
docker-compose rm && docker image prune -a
WSL
- General WSL troubleshooting
- “WSL2 Installation is Incomplete” - Follow the steps to install the missing component
- WslRegisterDistribution failed with error: 0x80070057 - this is common on older CPUs which does not support Virtulization, HyperV or SLAT - Solution: Open Powershell and change back to WSL 1 using
wsl --set-default-version 1
Windows Docker Troubleshooting
- “Docker Desktop requires Windows 10 Pro/Enterprise (######+) or Windows 10 Home (#####.####+)” - Windows 10 is running an old / unsupported version and needs to be updated before Docker will install.
- “Failed to execute script docker-composer” - Solution: Start Docker Desktop via the Windows Start Menu and restart Git Bash
- Docker / WSL2 consumes all your system’s RAM and is very slow - Limit resources
- “Windows Defender Firewall has blocked some features of this app” - Allow Access
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
docs/CONTRIBUTING.md at main - GitHub
Solve an issue. Scan through our existing issues to find one that interests you. You can narrow down the search using labels as...
Read more >How to Build a CONTRIBUTING.md
Introduction. A CONTRIBUTING.md file, in your open source repository or site, provides potential project contributors with a short guide to how they can...
Read more >How to Build a CONTRIBUTING.md - Best Practices
Address how to reference issues, pull requests, and how to include certain codes in this section of the CONTRIBUTING.md. Give code examples using...
Read more >Contributing instructions - Enthusiast Guide - Microsoft Learn
Learn the basic steps and guidelines for contributing to the Windows Mixed Reality Enthusiast Guide. We appreciate your feedback, edits, ...
Read more >Get Others Involved in Your Project with a CONTRIBUTING ...
Often new projects will skip the documentation steps because they “don't ... your CONTRIBUTING guide should evolve to address problem areas, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks to @Sboonny for moving this over to the CONTRIBUTING.md. See the Troubleshooting section and expand the appropriate topic areas for help with common technical errors and their solutions.
I see the point, and I like the idea👌, I will start implementing it. I will create every section with its PR because it hard to keep me from making silly mistakes.