简体   繁体   中英

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

I'm using ExtJS and GeoExt inside a Symfony application. After some troubles caused by wrong routing due to the assets dumping of Symfony, everything is working fine at the moment.

After finding a problem when trying to display layers of OpenLayers inside an Ext Panel, I tried to solved it this way :

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

Problem, I got this error:

 Uncaught TypeError: undefined is not a function 

The error is coming from the Ext.Require
If I just put

Ext.require([
]);

with nothing inside, no error. As soon as I put something inside, even if it's a Ext.something, the error shows up again.

The error is coming from :

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

Why ?

Found the reason, I was using

ext-debug.js

Switched to

 ext-all.js

and the error is gone.
My function are still not working tho, but it wasn't the theme of my question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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