Original User: odoeYou're mising a few references in the dependencies of your module.In the ZoomToXY filedefine([ "dojo/Evented", "dojo/_base/declare", "dojo/_base/lang", "dojo/has", "esri/kernel", "esri/arcgis/utils", "dijit/_WidgetBase", "dijit/_OnDijitClickMixin", "dijit/_TemplatedMixin", "dojo/on", "dijit/layout/ContentPane", "dijit/form/TextBox", "dijit/form/Button", // load template "dojo/text!./templates/ZoomtoXY.html", "dojo/dom-class", "dojo/dom-style" ], function ( Evented, declare, lang, has, esriNS, arcgisUtils, _WidgetBase, _OnDijitClickMixin, _TemplatedMixin, on, dijitTemplate, domClass, domStyle ) ...
Although it doesn't look like you're using it so you can delete it.In the Index_zoomWY_AMD file. require([ "esri/map", "dojo/parser", // You don't reference these in the alias of the function "dojo/dom", "esri/toolbars/navigation", "dijit/form/Button", "dijit/Toolbar", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/layout/AccordionContainer", "esri/dijit/BasemapGallery", "esri/arcgis/utils", "ERMWidgets/ZoomToXY", "dojo/domReady!" domReady! should be last argument ], function (Map, parser, BasemapGallery, arcgisUtils, /* This Navigation is in wrong order */Navigation , ZoomToXY) { ...
Order is important when defining the dependencies in your modules.Check out this Esri blog post for some more info.http://blogs.esri.com/esri/arcgis/2013/10/14/the-abcs-of-amd/