Fiori 启动板无法加载 UI5 应用程序,因为它找不到已注册的自定义模块 [英] Fiori launchpad fails to load UI5 app because it cannot find registered custom module

查看:83
本文介绍了Fiori 启动板无法加载 UI5 应用程序,因为它找不到已注册的自定义模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I've a custom control in my app. It runs as a standalone web application fine. But when I'm launching it from the Fiori Launchpad (FLP), it logs an error in the console. I've registered my control in my index.html file:

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

文件目录结构为:

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

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?

推荐答案

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

The common configuration for a Fiori tile is to point to the Component file. So the index.html file is not deployed together with the app. If it's absolutely necessary to register additional module paths, do it in manifest.json instead.

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

文档:Deliorscripter> 应用程序(见resourceRoots).

这篇关于Fiori 启动板无法加载 UI5 应用程序,因为它找不到已注册的自定义模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆