Search code examples
extjsextjs7

No ext-locale package available in ExtJS 7.3


For some weird reason, I'm getting this error:

Cannot satisfy requirements for "ext-locale"! [ERR] The following versions cannot be satisfied: [ERR] App: ext-locale (No matches!) [ERR] Cannot resolve package requirements

Per official instructions, I added the requires to app.json

"classic": {
        "requires": [
            "ext-locale"
        ]
    },

I'm using the universal template:

"template": "universalclassicmodern"

I looked at @sencha/ext-classic/ but I can't see a locale directory there.

Do I have to manually install the package via npm?


Solution

  • I finally found the solution:

    If you install ExtJS via npm, like:

    ext-gen app -a -t universalclassicmodern -n myApp
    

    You'll need to install localization packages separately with:

    npm i @sencha/ext-classic-locale
    npm i @sencha/ext-modern-locale
    

    And in app.json, you only need these settings regarding localization:

    "locale": "es", // <-- Your locale here
        "requires": [      
            "ext-locale"
        ],...
    

    Seems that you don't need to specify the locale for each build/tookit.

    This guide should be updated and explain it: https://docs.sencha.com/extjs/7.4.0/guides/core_concepts/localization.html