【发布时间】:2017-08-04 23:28:13
【问题描述】:
我正在尝试在生产构建文件夹中运行 index.html 文件,但在加载应用程序时出现错误“.js not found”(下面的其他错误)。同时使用 Sencha CMD 时构建编译成功用于开发和生产环境。Sencha app build production successfully,but the production page fails to load with .js not found error 的解决方案没有太大帮助,因为我们的应用程序有太多视图需要梳理以查找缺失的包含。有什么技巧可以快速解决这个问题吗?
Uncaught TypeError: c is not a constructor
at eval (eval at getInstantiator (app.js:1), <anonymous>:3:8)
at Object.create (app.js:1)
at Ext.Inventory.instantiateByAlias (app.js:1)
at Ext.Factory.create (app.js:1)
at ctor.setLayout (app.js:1)
at ctor.getLayout (app.js:1)
at ctor.initComponent (app.js:1)
at new constructor (app.js:1)
at ctor [as self] (app.js:1)
at Object.widget (app.js:1)
【问题讨论】:
-
打开应用程序加载文件时提琴手显示什么?
-
您是否只打开 index.html 文件并希望您的应用程序能够运行?老兄,它需要一些像 tomcat 这样的网络服务器。或者你可以使用 sencha 网络服务器。
-
请提供网络标签屏幕,以便我们知道哪个请求通过/失败
-
Tomcat?如果您实际上没有运行任何 Java 代码作为后端,我会选择 httpd。但除此之外,Tejas1991 是对的。将 Ext 作为文件打开时不会按预期运行:// Uri。
-
您使用的是什么版本的 Sencha CMD 和 ExtJS?
标签: javascript extjs frontend sencha-cmd