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

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

我的应用程序中有一个自定义控件。它 运行 作为一个独立的 Web 应用程序很好。但是,当我从 Fiori Launchpad (FLP) 启动它时,它会在控制台中记录错误。我已经在 index.html 文件中注册了我的控件:

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

文件目录结构为:

如果我删除我的自定义控件,那么我可以 运行 我的应用程序在启动板中。我需要在清单文件中添加一些设置吗?出现此错误的原因可能是什么?

Fiori 磁贴的常见配置是指向 Compopent.js 文件。所以 index.html 没有被调用。 FioriLaunchpad.html 扮演 index.html 的角色,ComponentContainer 在那里定义。

尝试在应用程序的其他地方注册您的自定义控件。

Fiori 磁贴的常见配置是指向组件文件。因此 index.html 文件 与应用程序一起部署。如果绝对有必要注册额外的模块路径,请在 manifest.json 中进行。

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

文档:Descriptor for Applications, Components, and Libraries(参见 resourceRoots)。

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