View Full Version : Sencha packaging generate error "document is not defined"

28 Dec 2012, 11:40 AM
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 ;)

30 Dec 2012, 9:10 AM
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?