Unhelpful error: "Uncaught TypeError: e[i] is not a constructor"

When trying to create a view of an invalid type (e.g. webix.ui({ view: 'space' })), Webix generates this error:

Uncaught TypeError: e[i] is not a constructor

The error text doesn't help the developer. It would be much more useful if Webix actually pointed out what the incorrect view type was (in most cases a typo).

Tagged:

Comments

  • If you use the debug version, you'll get unknown view: space

  • edited August 2018

    Hi Dan,

    We recommend using Webix debug version on a development stage, as it can show human-readable stack and UI error messages for typical mistakes. For the above case it will be: "unknown view: space".

    Here's the detailed blog post about the useful goodies of a debug mode.

    P.s. For Spacer view name is optional, you can just use {}.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!