简体   繁体   English

Fiori 启动板无法加载 UI5 应用程序,因为它找不到已注册的自定义模块

[英]Fiori launchpad fails to load UI5 app because it cannot find registered custom module

I've a custom control in my app.我的应用程序中有一个自定义控件。 It runs as a standalone web application fine.它可以作为独立的 Web 应用程序运行。 But when I'm launching it from the Fiori Launchpad (FLP), it logs an error in the console.但是当我从 Fiori Launchpad (FLP) 启动它时,它会在控制台中记录一个错误。 I've registered my control in my index.html file:我已经在我的index.html文件中注册了我的控件:

<script>
  sap.ui.localResources("sap.custom");
  sap.ui.localResources("sap.ui.codetools");
  sap.ui.localResources("libs");
</script>

错误

The structure of file directory is:文件目录结构为:

目录结构

If I remove my custom control, then I can run my app in the launchpad.如果我删除我的自定义控件,那么我可以在启动板中运行我的应用程序。 Do I need to add some settings in my manifest file?我需要在清单文件中添加一些设置吗? What could be the reason for this error?此错误的原因可能是什么?

The common configuration for a Fiori tile is to point to the Component file. Fiori tile 的常见配置是指向组件文件。 So the index.html file is not deployed together with the app.因此index.html文件不会与应用程序一起部署。 If it's absolutely necessary to register additional module paths, do it in manifest.json instead.如果绝对有必要注册其他模块路径,请改为在manifest.json

{
  "sap.ui5": {
    "resourceRoots": {
      "sap.ui.codetools": "sap/ui/codetools"
    }
  }
}

Documentation: Descriptor for Applications, Components, and Libraries (See resourceRoots ).文档: 应用程序、组件和库的描述符(请参阅resourceRoots )。

The common configuration for a Fiori tile is to point to the Compopent.js file. Fiori tile 的常见配置是指向 Compopent.js 文件。 So the index.html is not called.所以 index.html 没有被调用。 The FioriLaunchpad.html plays the role of the index.html and the ComponentContainer is defined there. FioriLaunchpad.html 扮演 index.html 的角色,ComponentContainer 在那里定义。

Try to register your custom control somewhere else within the app.尝试在应用程序内的其他地方注册您的自定义控件。

激活SICF上的APP节点(节点名称与App相同)

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

相关问题 ui5 App的自定义图块和启动板 - Custom tiles and Launchpad for ui5 App 来自 fiori 应用程序模板时将 ui5 应用程序部署到启动板 - Deploying a ui5 app to launchpad when coming from a fiori app template 从 Cloud Foundry 的 Fiori Launchpad 中的 ui5 应用程序获取用户信息 - Get user info from ui5 app within Cloud Foundry's Fiori Launchpad 需要从SAP Fiori中的其他主机加载UI5模块 - Need to load the UI5 Module from Other Host in SAP Fiori 如何将SAP UI5应用程序添加到Fiori Launchpad? - How to add a SAP UI5 application to Fiori Launchpad? SAP Fiori Launchpad定制应用程序错误:无法实例化对象:“新”丢失 - SAP Fiori Launchpad Custom App Error: Cannot instantiate object: “new” is missing UI5应用程序按哪个顺序执行,以及独立和Fiori Launchpad嵌入式UI5应用程序之间的执行方式有何不同? - In Which Order Excecutes a UI5 Application and How Differs the Execution Between a Stand Alone and Fiori Launchpad Embedded UI5 Application? Fiori Launchpad:无法运行自定义应用程序 - 发现负缓存 - Fiori Launchpad : could not run custom App -Found negative cache 如何使用自定义应用程序中的后退按钮访问 Fiori Launchpad? - How to get to Fiori Launchpad with back button in custom App? 如何自定义Fiori LaunchPad标头 - How to custom fiori launchpad header
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM