Wednesday, July 23, 2014

Sencha Touch Build error : touch/src/event/publisher/Dom.js? 404 (Not Found)

I was working on a touch app with version 2.3.0 and Sencha Cmd version 3.1.2.342 and it was using Architect version: 2.2.3

Recently, I had  to migrate the app to use Architect version : 3.0.4.
Had to solve few bugs to get it working. The following bug was one of them that occurred while creating the production build:
Sencha Touch Build error : touch/src/event/publisher/Dom.js? 404 (Not Found)

This mainly occurs if Touch Gestures have been used. Like we had something like this in the app used:
eventPublishers: {
        touchGesture: {
            recognizers: {
                tap: {
                    xclass: 'Ext.event.recognizer.Tap',
                    moveDistance: 35//This was adjusted from the default 8
                }
            }
        }
    }

With the Previous Architect and Cmd version, when we manually built the app using Cmd, we never recieved an error for the production build.

When you try build with Architect 3, you will get this error in which case you have to add the following classes in the requires:


'Ext.event.recognizer.*',
'Ext.event.publisher.*'