Results 1 to 5 of 5

Thread: CMD 6 - universal 6 - Spring Boot - build completes but wrong

  1. #1
    Sencha Premium User
    Join Date
    Sep 2007
    Posts
    13

    Default CMD 6 - universal 6 - Spring Boot - build completes but wrong

    I want to combine CMD 6 (no themes yet), just for production processing, sencha 6 (universal - both classic and modern toolkits) and Spring Boot as back end - (static content for now).

    Windows 7 machine, sencha 6, cmd 6

    I used CMD (sencha app generate ) to gen the default app - did "sencha app watch" on port 1841
    then - "sencha app build" to generate production build
    I took that directory and copied it to the "public" directory of a Spring Boot demo - "gs-consuming-rest-sencha" (replacing the original demo content)

    That worked for a while - "localhost:8080" displayed the default app with the personnel database, etc.

    But after a few cycles of "little tweaks" and rebuilding... - I started to get "no rendering" on the classic view - that is on the desktop browser - I can "View source" and it looks "normal?" - AND I could still see it from a mobile device.

    I see that there is
    "GET http://localhost:8080/.js?_dc=20160520120324 404 (Not Found)" - 404
    and
    "VM340:3 Uncaught TypeError: c is not a constructor"

    *** note the BLANK js file name ***



    These occur after "(index):67 XHR finished loading: GET "http://localhost:8080/classic.json?_dc=1463760605139"."

    So, in the build I guess there is something going wrong with the production buld classic view toolkit.

    1- would copying the "production" build dir of the app be the right thing to do?
    (the "qqq" is the copy of the original demo files)

    2016-05-20_1604.png


    2 - how to check that the "build" process did the right thing?
    it looked ok -
    C:\Projects2016\MyApp>sencha app build
    Sencha Cmd v6.1.2.15
    [INF] Processing Build Descriptor : classic
    [INF] Loading app json manifest...
    [INF] Appending content to C:\Projects2016\MyApp\bootstrap.js
    [INF] Writing content to C:\Projects2016\MyApp\classic.json
    [INF] Compressing data with YuiJavascriptCompressor
    [INF] Writing concatenated output to file C:\Projects2016\MyApp\build\production\MyApp\classic\app.js
    [INF] merging 223 input resources into C:\Projects2016\MyApp\build\production\MyApp\classic\resources
    [INF] merged 0 resources into C:\Projects2016\MyApp\build\production\MyApp\classic\resources
    [INF] merging 19 input resources into C:\Projects2016\MyApp\build\production\MyApp
    [INF] merged 10 resources into C:\Projects2016\MyApp\build\production\MyApp
    [INF] Copying page resources to C:\Projects2016\MyApp\build\production\MyApp
    [INF] Applying version stamps to json resource entries
    [INF] Generating file deltas to C:\Projects2016\MyApp\build\production\MyApp\classic\deltas
    [INF] Writing content to C:\Projects2016\MyApp\build\production\MyApp\classic.json
    [INF] Writing content to C:\Projects2016\MyApp\build\production\MyApp\microloader.js
    [INF] Appending content to C:\Projects2016\MyApp\build\production\MyApp\microloader.js
    [INF] Building output markup to C:\Projects2016\MyApp/build/production/MyApp/index.html
    [INF] Writing content to C:\Projects2016\MyApp\build\production\MyApp\index.html
    [INF] generating cache manifest to C:\Projects2016\MyApp/build/production/MyApp/cache.appcache
    [INF] Processing Build Descriptor : modern
    [INF] Loading app json manifest...
    [INF] Appending content to C:\Projects2016\MyApp\bootstrap.js
    [INF] Writing content to C:\Projects2016\MyApp\modern.json
    [INF] Compressing data with YuiJavascriptCompressor
    [INF] Writing concatenated output to file C:\Projects2016\MyApp\build\production\MyApp\modern\app.js
    [INF] merging 365 input resources into C:\Projects2016\MyApp\build\production\MyApp\modern\resources
    [INF] merged 0 resources into C:\Projects2016\MyApp\build\production\MyApp\modern\resources
    [INF] merging 19 input resources into C:\Projects2016\MyApp\build\production\MyApp
    [INF] merged 10 resources into C:\Projects2016\MyApp\build\production\MyApp
    [INF] Copying page resources to C:\Projects2016\MyApp\build\production\MyApp
    [INF] Applying version stamps to json resource entries
    [INF] Generating file deltas to C:\Projects2016\MyApp\build\production\MyApp\modern\deltas
    [INF] Writing content to C:\Projects2016\MyApp\build\production\MyApp\modern.json
    [INF] Writing content to C:\Projects2016\MyApp\build\production\MyApp\microloader.js
    [INF] Appending content to C:\Projects2016\MyApp\build\production\MyApp\microloader.js
    [INF] Building output markup to C:\Projects2016\MyApp/build/production/MyApp/index.html
    [INF] Writing content to C:\Projects2016\MyApp\build\production\MyApp\index.html
    [INF] generating cache manifest to C:\Projects2016\MyApp/build/production/MyApp/cache.appcache





    Please help with any ideas or suggestions

    Thanks

  2. #2
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    97

    Default

    In my experience the .js 404 (Not Found) error is the result of omitting the correct requires: [...] in a view. E.g. if you start with the default generated app and you add a border layout in your view you must add the requires in your view, like:

    Code:
        requires: [    
            'Ext.layout.container.Border'
        ]

  3. #3
    Sencha Premium User
    Join Date
    Sep 2007
    Posts
    13

    Default

    Thank you MRMV - I am still trying this and will let you know.

  4. #4
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    97

    Default

    Just for reference, I noticed this topic explains the same thing https://www.sencha.com/forum/showthr...built-with-CMD

  5. #5
    Ext JS Premium Member
    Join Date
    Aug 2007
    Location
    Sarnia, ON, Canada
    Posts
    62

    Default

    Topic is old, but hopefully this helps someone in the future. In my experience the best way to troubleshoot this, is to do a "sencha app build testing". Open the testing build and view the browser errors, and you should see an error that's more specific, such as:

    Uncaught Error: [Ext.createByAlias] Unrecognized alias: plugin.gridfilters

    Look up the alias in the API docs to get the full class path. In my example, I simply need to add a requires to Ext.grid.filters.Filters and everything works.

Similar Threads

  1. Add ExtJS6.0 to a spring-boot application
    By jiml3993 in forum Ext JS 6.x Q&A
    Replies: 5
    Last Post: 10 Jan 2019, 7:02 AM
  2. Ext JS 6 + Spring-Boot Setup & Workflow Questions
    By marcschenke in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 3 Mar 2016, 2:06 AM
  3. ??: How to Build a Great Looking Universal App with Ext JS Part 1
    By martini3oz in forum Sencha日本語フォーラム
    Replies: 0
    Last Post: 28 Oct 2015, 6:26 PM
  4. Replies: 2
    Last Post: 8 Dec 2014, 8:20 AM
  5. Replies: 1
    Last Post: 5 May 2014, 8:38 AM

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
  •