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).

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

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 {}.