Results 1 to 2 of 2

Thread: Broken production build

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default Broken production build

    hi everyone,
    I am trying to make my first sencha app running and I am facing a lot of issues.
    • My first issue is with microloader, is this a proper index.html file?
    HTML Code:
    <!DOCTYPE HTML>
    <html manifest="" lang="en-US">
    <head>
        <meta charset="UTF-8">
        <title>XXX</title>
        <script id="microloader" type="text/javascript" src="js/sencha-sdk/microloader/development.js"></script>
    </head>
    <body>
    <div id="appLoadingIndicator"><div></div><div></div><div></div></div>
    </body>
    </html>
    As all my .js dependencies are listed in proper order in app.json, I am able to compile my app using sencha app build testing and I can view my app nicely, everything is working as expected.
    • Now I wanted to create release build so I tried sencha app build production and suddenly started seeing
    Error evaluating <a href="http://localhost/.../SomeJS.js" target="_blank" rel="nofollow">http://localhost/.../SomeJS.js</a> with message: ReferenceError: SomeJs is not defined
    ...in chrome console at runtime
    • I tought maybe chaning microloader/development.js to microloader/production.js would help, but with production.js I am not even able to run production build, I receive:
    [ERROR] TypeError: 'undefined' is not a function
    phantomjs://webpage.evaluate():7
    phantomjs://webpage.evaluate():1
    ...\js\sencha-sdk\command\vendor\phantomjs\dependencies.js:36

    This issue seems to be frequent all over the web but I was not able to find working solution. My code is compiled fine for testing and throws issues at production? Why is that?
    • Is it necessary to replace microloader for production.js in production build, or build process is smart enough to do this itself?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Sencha Command will create the index.html for you and when you do a build it will use the appropriate microloader. When I see the undefined is not a function, that usually means you didn't require a class properly.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

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
  •