Let's start with a simple, basic need: logging. Having solid, correct logging set up can help you find problems quickly, while incomplete or otherwise lacking logging can make you look for hours for what could be a simple, trivial problem. A basic rule for any application is to ensure that proper login is set up so that you can be confident that any situation that comes up will at least be recognized and recorded for future analysis.
The first idea you could have is to just use the console family of functions, such as console.log(), console.warn(), console.info(), and more. (For a complete reference, check out https://developer.mozilla.org/en-US/docs/Web/API/console.) While these are good for quick debugging, they just don't do it for application-level logging. You should be able to select what kind of logs you want (everything? Errors only...