If you are coming from a traditional server-side development tool such as .NET or Java, you are probably used to really good tooling, and direct access to logs and stack traces of what is happening within your application when a user encounters an error. In JavaScript, almost all of our code is run client-side, so we don't have that out of the box.
Fortunately, there are a number of really good tools that will catch client-side errors and report them back to a server. This is pretty easy to do yourself, but the tool providers out there make it easier to understand what is going on in your errors, and can also apply things like source maps automatically to make the errors more meaningful.
Most of these are paid tools, but here's a list of client-side error catching tools:
Providers
RERE