Errors at runtime with generated sencha touch app
I'm a seasoned java developer, but quite new to sencha touch.
I began writing a sencha touch application and so far, it is going really good, but I am experiencing a really weird thing when I build my app using sencha cmd tools.
I mean, I used "sencha generate app" to create my app in the first place and I started coding. My app works really well if I point my browser directly to my app folder.
If I do a "sencha app build testing", the compilation terminates successfully, but at runtime, I get a weird error complaining about this line:
"Ext.Viewport.getWindowWidth()" it says something is undefined ?!!?!?
This is really weird, because it is working all good before compiling. Anyway, for testing purpose I tried removing this line and it works without it.
Then if I use "sencha app build production" it gets even weirder, because it still compiles successfully, but now I get another error at runtime complaining about some unexpected identifier. (this is something new because with production attribute, I get this error even without the getWindowWidth() line).
Something is obviously really wrong with this building process, because it is all working before compiling, then compiler finished successfully and still at runtime it fails
Any help would be really appreciated, because I am really lost here!
When in development are you seeing errors logged in the console saying that some classes were loaded synchronously and suggesting that you 'require' the class?
If not, this might not be quite enough info to go on. In that case I might have you follow the template here for reporting a Cmd issue to help us debug with you: