Results 1 to 2 of 2

Thread: Sencha packaging generate error "document is not defined"

  1. #1
    Sencha User
    Join Date
    Jun 2012
    Vote Rating

    Default 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":

    c:\wamp\....\v3>sencha app build production
            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
        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!

    I'm a froggie frenchy, sorry for my grammar

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    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 @LikelyMitch
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts