0

I am using ExtJS 6.2

I have the following line in my app.json:

"requires": [
        "font-awesome",
        "ux"
    ],

I am trying to create a simple text view using LiveSearchGrid.js, so I have the following in my app_name=md_registry folder md_registry/app/view/main/ListTest.js:

Ext.define('md_registry.view.main.ListTest', {
    extend: 'Ext.ux.LiveSearchGridPanel',

    //xtype: 'row-expander-grid',
    //store: 'Patients',
    xtype: 'mainlisttest',

    requires: [
        'md_registry.store.Patients',
        'Ext.ux.LiveSearchGridPanel'
    ],

When I try doing a sencha app build, I get the following compiler error: Failed to resolve dependency Ext.ux.LiveSearchGridPanel for file md_registry.view.main.ListTest

I have verified that this file exists in the path: md_registry/ext/packages/ux/classic/src

From everything I've read, specifying the above requires in my app.json should be sufficient, but it's obviously not.

horcle_buzz
  • 2,101
  • 3
  • 30
  • 59

2 Answers2

1

You are right now creating a universal app, but not using the correct folders for your code. You should definitely look into either creating a classic-only app, or a universal app with correct folder structure. If you want to make a universal app, but not now, you can compile only classic.

Alexander
  • 19,906
  • 19
  • 75
  • 162
0

The solution was completely unobvious:

Had to comment this out from the "builds" profile in app.json:

"modern": {
            "toolkit": "modern",

            "theme": "theme-triton",

            "sass": {
                "generated": {
                    "var": "modern/sass/save.scss",
                    "src": "modern/sass/save"
                }
            }
        }

I hope this helps someone!

horcle_buzz
  • 2,101
  • 3
  • 30
  • 59
  • 1
    You are right now creating a universal app, but not using the correct folders for your code. You should definitely look into either [creating a classic-only app](https://docs.sencha.com/extjs/6.2.1/guides/application_architecture/developing_for_multiple_screens_and_environments.html), or [a universal app with correct folder structure](https://www.sencha.com/blog/how-to-build-a-great-looking-universal-app-with-ext-js-part-2/). If you want to make a universal app, but not now, you can [compile only classic](https://stackoverflow.com/questions/39074214/universal-app-only-build-classic-toolkit). – Alexander Jun 21 '17 at 02:59
  • Cool! Thanks for the links. It now makes more sense. – horcle_buzz Jun 21 '17 at 15:46
  • If you post this as an answer, I will chose it. – horcle_buzz Jun 23 '17 at 02:14