W
W
WebDev2019-02-21 12:12:10
JavaScript
WebDev, 2019-02-21 12:12:10

Disgusting error log in nuxt?

Who works with Nuxt? Can you please explain how you deal with mistakes? It's kind of a nightmare. The error does not contain any useful information.
For example:
5c6e6b1ca2b5b201266393.png
Where is the error? In what component? In what method?
Maybe something somewhere can be enabled for a normal stack trace, but I don't know?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
Maxim Timofeev, 2019-02-21
@webinar

The error does not contain any useful information.

In general, this problem exists in all js. It's disgusting language. But so far there is nothing better. How to write - give a link, I'll jump first.

D
Dima Pautov, 2019-02-21
@bootd

Google them if they don't make sense. It's not always the component!
For example, the error may be due to the directive v-htmlinside which the html curve is inserted
. Either due to the hidden v-if logic or not understanding the logic of this directive, sometimes it helps to change it to v-showproof
. Sometimes it happens that the DOM did not have time to change, but the changes based on reactive data, where, as I wrote above, v-if may not work, as you think! Sometimes this can be fixed with a function this.$nextTick
. This error can also occur when many v-ifs are nested into each other, when the nested v-if has already worked, but the parent one has not, from which it cannot use the method appendChildfor inserting into the house, because. using v-if a comment is inserted into the DOM that doesn't have a methodappendChild. It is necessary to monitor the order of execution of v-if
. Perhaps the problem may be due to SSR, because. there are modules that, due to their logic, should not be rendered and executed on the server
. There are many variations, it always happens differently for everyone. Look for the page on which it appears and already there look for the problem.

I
Interface, 2019-02-21
@Interface

You need to set up source-maps, see how to do it in your environment.
For webpack, you can, for example, read https://survivejs.com/webpack/building/source-maps/
Source-map just allows you to get adequate stack-traces and, in general, an extremely useful thing for debugging

P
profesor08, 2019-02-21
@profesor08

https://ru.nuxtjs.org/guide/installation
If you created your project like this, then the sourcemaps should work for you, if not, then look for a way to add them, then you will receive more detailed information about errors and where they happened .
And you also have some $options not defined, maybe it's from him that the legs grow.
Or maybe you are trying to inject a third-party library or code that works with dom, after re-rendering the component, of course, all references to elements will die in it.
So to really help you, a screenshot of the error is not enough, you need a working example of code that demonstrates all this.

I
Igor, 2019-07-16
@IgorPI

Stop, this is a call stack
. This is enough to understand what js did when it tried to execute the code.
Use additional funds.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question