1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    8
    Vote Rating
    2
    themel is on a distinguished road

      2  

    Default Cannot build package: Ext. dependency not found

    Cannot build package: Ext. dependency not found


    Hi,

    I'm trying to squeeze my existing ExtJS 4 project into the new workspace/application/package structure. There's two mostly independent pages with some shared code and CSS between them.

    I created a new workspace, the two applications and a package for the shared code using the appropriate build commands. I then copied my application code to the applications' code directories and the shared code to the package's src directory, modified the app.json files to add the dependencies and built the applications.

    While the resulting build outputs are fine, the application does not load in "Dev mode", i.e. working from the source directories, since the generated bootstrap.js does not include any classpath mappings to the package. In a way, this is unsurprising, since the docs state that I need to run
    Code:
    sencha package build
    This produces a "build" folder inside the package. This is needed by applications when they are running in "dev mode" (without being compiled).
    but a) that does not work (see later) and b) I'm confused how this works conceptually - I don't think building the package would give me a new bootstrap.js in the applications using the package? Would I have to rebuild the applications afterwards, even though I intend to continue using them in dev mode? How do changes then work, when do I have to re-run the package build / app build after package changes?

    Regarding the problems with package build, my package (generated using sencha cmd packge -type code packagename) fails to build with a missing dependency that should obviously come from ExtJS -
    Code:
    C:\web\packages\packagename>sencha package build
    Sencha Cmd v3.1.0.256
    [INF]
    [INF] init-plugin:
    [INF]
    [INF] init-plugin:
    [INF] Invoking plugin (C:\web\packages\packagename\.sencha\package\plugin.xml) - supported targets: -before-pkg-build
    [INF]
    [INF] -before-pkg-build:
    [INF] Invoking plugin (C:\web\packages\packagename\.sencha\package\plugin.xml) - supported targets: pkg-build
    [INF]
    [INF] init-properties:
    [INF]
    [INF] init-sencha-command:
    [INF]
    [INF] init:
    [INF]
    [INF] -before-pkg-build:
    [INF]
    [INF] pkg-build-impl:
    [INF]
    [INF] init-local:
    [INF]
    [INF] -before-init-local:
    [INF]
    [INF] -after-init-local:
    [INF]
    [INF] find-cmd:
    [INF]
    [INF] init:
    [INF]
    [INF] -before-init:
    [INF] Initializing Sencha Cmd ant environment
    [INF] Adding antlib taskdef for com/sencha/command/compass/ant/antlib.xml
    [INF]
    [INF] -after-init:
    [INF]
    [INF] -before-build:
    [INF]
    [INF] js:
    [INF]
    [INF] -before-js:
    [INF] Loading classpath entry C:\web\packages\packagename\overrides
    [INF] Loading classpath entry C:\web\packages\packagename\src
    [ERR] Failed to resolve dependency Ext.data.Model for file packagename.model.MyModel
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.data.Model
    [ERR]
    [ERR] Total time: 5 seconds
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.BasicException: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.data.Model
    [ERR]
    [ERR] Total time: 6 seconds
    [ERR] com.sencha.exceptions.BasicException: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.data.Model
    Shouldn't these classes be available for any package? How would I specify that I need them?

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    8
    Vote Rating
    2
    themel is on a distinguished road

      0  

    Default


    After some more investigation, I still haven't figured out how to build my package, but as I already suspected, the suggestion that I need to build it in order to use my applications in dev mode does not seem to be entirely accurate. The part I was missing was that I needed to run sencha app refresh --packages on my applications, and that probably needs to happen every time I add a new class to the package since the resulting bootstrap file seems to add classpath mappings for every single class to the bootstrap.js.

    I'd still be interested in the concepts behind packages and framework classes - it looks like packages aren't actually tied to an SDK version explicitly? If you're successfully using packages for sharing ExtJS code, can you explain to me how you do it?

  3. #3
    Ext JS Premium Member
    Join Date
    Jun 2008
    Posts
    19
    Vote Rating
    1
    7twenty is on a distinguished road

      1  

    Default Same problem: How to use Ext JS classes in a package

    Same problem: How to use Ext JS classes in a package


    Here is the steps I tried:
    - run: sencha generate package -type code MyPackage
    - added an empty class to $workspace/packages/MyPackage/src/bc that extends Ext.panel.Panel
    - run: sencha package build

    I receive this error:

    Code:
    INF -before-js:
    [INF] Loading classpath entry C:\p4\sandbox\extjs-theme\my-workspace\packages\MyPackage\overrides
    [INF] Loading classpath entry C:\p4\sandbox\extjs-theme\my-workspace\packages\MyPackage\src
    [ERR] Failed to resolve dependency Ext.panel.Panel for file bc.MyPanel
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel.Panel
    Last edited by 7twenty; 23 Apr 2013 at 10:17 AM. Reason: formatting
    ExtJS is amazing.

  4. #4
    Ext JS Premium Member
    Join Date
    Jun 2008
    Posts
    19
    Vote Rating
    1
    7twenty is on a distinguished road

      0  

    Default workaround?

    workaround?


    The only way I could get this to work was to add the following to my package's sencha.cfg:

    Code:
    package.classpath=${package.dir}/src,${workspace.dir}/ext/src
    ExtJS is amazing.

  5. #5
    Ext JS Premium Member
    Join Date
    Jun 2008
    Posts
    19
    Vote Rating
    1
    7twenty is on a distinguished road

      0  

    Default Workaround Failed

    Workaround Failed


    Nevermind the workaround didn't work. I can successfully build the package, but I cannot consume the package from an "app". The ext src gets put in the source path twice which causes the "sencha app build" to fail.
    ExtJS is amazing.

  6. #6
    Sencha Premium Member bpjohnson's Avatar
    Join Date
    Jun 2007
    Location
    Atlanta, GA
    Posts
    46
    Vote Rating
    6
    bpjohnson is on a distinguished road

      4  

    Default


    Quote Originally Posted by 7twenty View Post
    Nevermind the workaround didn't work. I can successfully build the package, but I cannot consume the package from an "app". The ext src gets put in the source path twice which causes the "sencha app build" to fail.
    I ran into the same problem, so I went crawling through the build-impl.xml file. I've found that when I run into Cmd issues, that's where I'll find my answers.

    Anyway, I was able to fix this issue by adding the following to my .sencha/package/sencha.cfg file:

    PHP Code:
    package.framework=ext 
    If you're building a package for touch, of course you should change that value. Once I added that, I could build both my package and my app without any issues.

    Cheers,
    Bryan

  7. #7
    Ext JS Premium Member
    Join Date
    Jun 2008
    Posts
    19
    Vote Rating
    1
    7twenty is on a distinguished road

      0  

    Default


    Thanks that works for me too.
    ExtJS is amazing.

  8. #8
    Sencha Premium Member
    Join Date
    Sep 2012
    Posts
    12
    Vote Rating
    0
    tjcsencha is on a distinguished road

      0  

    Exclamation


    Any ideas why this would not work for me? I generated a code package....created a single class extending Ext.button.Button. Added 'package.framework=ext' to my ./package/sencha.cfg file but when I build it, it fails.....still cannot resolve Ext.

    [INF] Loading classpath entry /Users/tj/Dev/views/MyWorkspace/packages/core/overrides
    [INF] Loading classpath entry /Users/tj/Dev/views/MyWorkspace/packages/core/src
    [ERR] Failed to resolve dependency Ext.button.Button for file CoreButton
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.button.Button
    [ERR]
    [ERR] Total time: 1 second
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.BasicException: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.button.Button
    [ERR]
    [ERR] Total time: 1 second
    [ERR] com.sencha.exceptions.BasicException: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.button.Button

  9. #9
    Sencha User
    Join Date
    Mar 2013
    Posts
    3
    Vote Rating
    2
    rcasola is on a distinguished road

      1  

    Default


    Not working for me either.




    I have a class in my package that extends Ext.data.Model. Without changing the .cfg the package build fails...
    [ERR] Failed to resolve dependency Ext.data.Model for file common.src.Claim
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.data.Model




    After adding package.framework=ext to sencha.cfg, build still fails...
    == Unhandled Error ==
    ReferenceError: Can'''t find variable: Ext


    file:///C:/cl/rmis/senchaTest/ClaimStatus/packages/common/build/example/render.js:6


    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
    [ERR]
    [ERR] Total time: 13 seconds
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.BasicException: com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
    [ERR]
    [ERR] Total time: 14 seconds
    [ERR] com.sencha.exceptions.BasicException: com.sencha.exceptions.ExProcess: phantomjs process exited with code 2


    Any ideas?

  10. #10
    Sencha Premium Member
    Join Date
    Apr 2013
    Posts
    33
    Vote Rating
    9
    dwils will become famous soon enough

      0  

    Default


    Quote Originally Posted by rcasola View Post
    Not working for me either.

    After adding package.framework=ext to sencha.cfg, build still fails...
    == Unhandled Error ==
    ReferenceError: Can'''t find variable: Ext

    file:///C:/cl/rmis/senchaTest/ClaimStatus/packages/common/build/example/render.js:6

    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
    [ERR]
    [ERR] Total time: 13 seconds
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.BasicException: com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
    [ERR]
    [ERR] Total time: 14 seconds
    [ERR] com.sencha.exceptions.BasicException: com.sencha.exceptions.ExProcess: phantomjs process exited with code 2

    Any ideas?
    Same issue

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar