How to solve errors as a web developer
3 min readMay 16, 2020
--
Now, this is not the solution but how to actually reach it.
You probably will be looking for a way (for your error) when using 3rd party stuff as we don’t have the understanding, cause, we couldn't care more than the functionality.
Cutting to the chase, this is what you should do-
Before the error
- Look for stable components(3rd party stuff) when you need it
- has a good code documentation
- lots of people are actually using it
- PRO TIP: briefly go through the issue section(eg: in GITHUB) and choose the one with the least issues - Check the peer dependencies of the plugins(packages) don’t install anything unnecessary
- It’s okay to take time when deciding, no one wants to undo the changes just because of a faulty stuff
- Wash face with your mouth filled with water, really helps refreshing
- It's usually the case when your requirements can’t be met with a specific package, try choosing the most flexible one in that case
- handles function parameter error
- has documentation where it states how to achieve custom tasks
- look for any available examples for above - Just stay calm and don’t get over-excited, (you will know when you’ll look for your packages)
_THE_Error_ has occurred
- Hope that the documentation was followed correctly.
- If you are working with javascript there is a chance that the creator was humble enough to create a typescript as well
use the typescript to verify if the error was because the docs had a spelling mistake
(could be something similar for the codebase) - Look for any available stack trace if it exists and try to find the cause (/code) of the error (gives you a vague/basic understanding of what’s happening).
[This is not always the case, so you can skip this step] - Search for that console error in the issue section inside GITHUB.
[note: during searching, remove the isOpen filter in the search query] - Try doing a google search and look for solutions in StackOverflow plus including all it’s brothers and sisters as well.
- Try searching for the code in any pre-existing GITHUB repo
- Look at the docs to check for any alternative strategy
- Time to look into point-2 if in case you skipped it
- Is it a dependency issue??
- There are also errors like 500,502 error, etc
- random network error (like 502) - “and that’s sad”,
- CORS- “that’s just a permission issue, try running the browser in safe mode”,
- sometimes the variables don’t update- “time for a hack, HEHE”,
note: there are many more like these, try looking into common errors faced during development. - You can also look into creating a custom component/module/anything for your case
- (look at BEFORE THE ERROR section)
- could be a logical issue, do some rethinking
Personal Comment:
“That’s mostly all to it. If I find something important that i missed out, will make sure to add it. Also make sure to keep your fundamentals in check.”