SAPUI5 – Webclient-Deployment of an Extension – sap.insights missing

I am currently working with SAPUI5 and have developed a application, which should be deployed to the SAP Business One WebClient. I tested my application thoroughly during development and it functions as expected.

However, deployment seems to be quite the issue. Firstly, I have used the following command to build my project:
ui5 build --config=ui5.yaml --clean-dest --dest dist

The file “ui5.yaml” contains the following content:

specVersion: "3.1"
metadata:
  name: myApp
type: application
framework:
  name: SAPUI5
  version: 1.123.2
  libraries:
    - name: sap.m
    - name: sap.ui.core
    - name: sap.f
    - name: sap.suite.ui.generic.template
    - name: sap.ui.comp
    - name: sap.ui.generic.app
    - name: sap.ui.table
    - name: sap.ushell
    - name: themelib_sap_horizon
    - name: sap.insights
server:
  customMiddleware:
    - name: fiori-tools-proxy
      afterMiddleware: compression
      configuration:
        ignoreCertError: true
        ui5:
          path:
            - /resources
            - /test-resources
          url: https://ui5.sap.com
        backend:
          - path: /b1s
            url: https://x.x.x.x:x
    - name: fiori-tools-appreload
      afterMiddleware: compression
      configuration:
        port: x
        path: webapp
        delay: 300
    - name: ui5-tooling-transpile-middleware
      afterMiddleware: compression
      configuration:
        debug: true
        excludePatterns:
          - /Component-preload.js
    - name: fiori-tools-preview
      afterMiddleware: fiori-tools-appreload
      configuration:
        component: myApp
        ui5Theme: sap_horizon
builder:
  customTasks:
    - name: ui5-tooling-transpile-task
      afterTask: replaceVersion
      configuration:
        debug: true

I have used the VS Code Plugin outlined in this chapter of the docs to package my application build into an MTAR.

During this entire process, I didn’t encounter a single error. But when I finally import my WebClient-Extension via the ExtensionManager (and assign it to a CompanyDB) and attempt to open it in the WebClient, I get this error:

WebClient Error message

Expected: The WebClient-Extension functions in the WebClient as it did during development.
Actual result: I get an error (in my browser console), which says, that sap.insights cannot be found. The WebClient displays the following error message: Failed to load UI5 component for navigation intent “#webclient-myApp-myApp”.

What I have tried so far:

  • Using a self-contained build.
  • Downgrading the SAPUI5 version to 1.120.4.
  • Manually including the dependency in the UI5 build using –include-dependency sap.insights

I have already checked the modules available on my WebClient and sap.insights isn’t amongst them. How can I add this module to my WebClient and/or fix this error? I am using FP 2405.

Thanks in advance