Webix Jet 3+ subfolder TypeError: modules[name] is not a function

I try to migrate new webix jet "webix-jet": "^3.0.1"
always found error when I use subfolder
when I access to http://localhost:5173/#!/app/p.serviceorder

my folder structure

.
├── locales
│   ├── de.js
│   └── en.js
├── models
│   └── records.js
├── myapp.js
├── styles
│   └── app.css
└── views
    ├── appbar.js
    ├── app.js
    ├── data.js
    ├── menu.js
    ├── p
    │   └── serviceorder
    │       └── index.js
    └── start.js
myapp.js:35 TypeError: modules[name] is not a function
    at views (myapp.js:6:52)

the error point to this

const views = name => modules[`./views/${name}.js`]().then(x => x.default);

I user old version "webix-jet": "^1.6.2" working fine

any other setup to migrate ?

Hi, for views that are stored in folders other than /views, replace . with / in name. jet-demos/sources/views/index.js at master · webix-hub/jet-demos · GitHub

Thanks @kuro
working using this view

1 Like