繁体   English   中英

未捕获的TypeError:未定义不是函数/ Ext.Require / ExtJS

[英]Uncaught TypeError: undefined is not a function / Ext.Require / ExtJS

我在Symfony应用程序中使用ExtJS和GeoExt。 在由于Symfony的资产倾销而因错误的布线而导致一些麻烦之后,此刻一切正常。

在尝试在Ext Panel内显示OpenLayers的层时发现问题之后,我尝试通过以下方式解决它:

Ext.require([
  'GeoExt.panel.Map',
  'GeoExt.tree.OverlayLayerContainer',
  'GeoExt.tree.BaseLayerContainer',
  'GeoExt.data.LayerTreeModel',
  'GeoExt.tree.View',
  'GeoExt.tree.Column',
]);

问题,我收到此错误:

 Uncaught TypeError: undefined is not a function 

错误来自Ext.Require
如果我把

Ext.require([
]);

里面什么也没有,没有错误。 一旦我将东西放进去,即使它是Ext.something,错误也会再次出现。

错误来自:

/server path/ExtJS4.2/src/menu/Manager.js:182

为什么呢

找到原因,我正在使用

ext-debug.js

切换到

 ext-all.js

错误消失了。
我的功能仍然无法正常工作,但这不是我的问题的主题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM