1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    6
    Vote Rating
    0
    JessyL is on a distinguished road

      0  

    Default Sencha packaging generate error "document is not defined"

    Sencha packaging generate error "document is not defined"


    Hello guys!

    I recently update to 2.1 because of problem while trying to launch my application on Safari for iPhone/iPad 4.3.

    I corrected the last bugs and, now, when i try to launch "sencha app build production" it throw an error "ReferenceError: document is not defined":

    Code:
    c:\wamp\....\v3>sencha app build production
    node.js:201
            throw e; // process.nextTick error, or 'error' event on first tick
                  ^
    ReferenceError: document is not defined
        at c:\wamp\...\v3\sdk\src\core\class\Loader.js:1299:19
        at Object.<anonymous> (c:\wamp\...\v3\sdk\src\core\class\Loa
    der.js:1323:2)
        at Module._compile (module.js:441:26)
        at Object..js (module.js:459:10)
        at Module.load (module.js:348:31)
        at Function._load (module.js:308:12)
        at Module.require (module.js:354:17)
        at require (module.js:370:17)
        at c:\wamp\...\v3\sdk\command\sencha.js:40:9
        at Array.forEach (native)
    I tried:
    - Copy the app's corrections and build via 2.0 SDK, build success but safari still bug
    - Re-download and re-extract 2.1 sdk in my app's folder
    - Comment vendors libraries (Cordova/Phonegap, jQuery, Google Maps)

    I have no idea why it can't find document? My idea is the SDK "browser simulator" which try to find app's dependencies have javascript emulation problem?

    Have someone already had this bug? Or have an idea that could help me?

    Many thanks in advance!

    PS:
    I'm a froggie frenchy, sorry for my grammar

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,065
    Vote Rating
    851
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    To get more debug info you can use the -d flag.. sencha -d app build production

    When you upgraded, did you try the app upgrade command or start fresh with a new app and copy over your files?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread