Skip to content

Commit cccb9b2

Browse files
authored
Merge pull request #181 from SAP-samples/docs/neo-migration-ui5-cli-v4-minui5version
docs(neo-migration): add @ui5/cli v4 upgrade guide and minUI5Version BWZ troubleshooting
2 parents 2479c18 + 34aefeb commit cccb9b2

1 file changed

Lines changed: 111 additions & 1 deletion

File tree

neo-migration/README.md

Lines changed: 111 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ For more information, see [Importing an Application without Source Control](http
143143

144144
Once you have downloaded the application source artefacts, follow one of the following migration options.
145145

146-
147146
1. [Migrate Neo application for a single SAP Fiori UI application](Option1.md)
148147
2. [Migrate Neo application supporting multiple SAP Fiori UI applications](Option2.md)
149148

@@ -163,9 +162,62 @@ You must choose "Add Project" from the migration tab if your extension project i
163162

164163
For more information about supported features, see [Supported Migration Features](https://help.sap.com/docs/SAP_FIORI_tools/17d50220bcd848aa854c9c182d65b699/f540ae1961914bf783cd266f3c0d8530.html?locale=en-US).
165164

165+
## Upgrading `@ui5/cli` to v4
166+
167+
After migrating your application, update `@ui5/cli` to v4 to benefit from the latest toolchain improvements. For more information, see [Migrate to v4](https://ui5.github.io/cli/v4/updates/migrate-v4/).
168+
169+
### Prerequisites
170+
171+
- Node.js v20.11.0 or higher, or v22.0.0 or higher. Node.js v21 is not supported.
172+
- `npm` v8 or higher.
173+
174+
### Update `@ui5/cli`
175+
176+
Update `@ui5/cli` in your `package.json` file to v4:
177+
178+
```bash
179+
npm install --save-dev @ui5/cli@^4
180+
```
181+
182+
### Breaking Changes
183+
184+
If your project uses Specification Version 2.x or 3.x, no changes are required — projects using these versions are fully compatible with `@ui5/cli` v4.
185+
186+
If your project uses Specification Version 4.0 or higher, review the following breaking changes.
187+
188+
**Remove `usePredefineCalls`**
189+
190+
The `usePredefineCalls` option has been removed. Bundling now always uses `sap.ui.predefine` calls. Remove this property from your `ui5.yaml` file if present:
191+
192+
```yaml
193+
builder:
194+
bundles:
195+
- bundleDefinition:
196+
sections:
197+
- mode: require
198+
resolve: true
199+
sort: true
200+
```
201+
202+
**Async require sections**
203+
204+
The `async` option for `require` bundle sections now defaults to `true`. This changes the loading behaviour from `sap.ui.requireSync` to `sap.ui.require`. If your application requires synchronous loading, set `async: false` explicitly:
205+
206+
```yaml
207+
builder:
208+
bundles:
209+
- bundleDefinition:
210+
sections:
211+
- mode: require
212+
async: false
213+
```
214+
215+
For more information, see [Migrate to v4](https://ui5.github.io/cli/v4/updates/migrate-v4/).
216+
166217
## Troubleshooting
167218

168219
### SAP Fiori Migration Tool Does Not Detect Your Application
220+
169221
SAP Fiori Migration tool does not detect your application, ensure your exported project contains a `webapp` folder. If this folder is missing, generate a `webapp` folder inside the root of your project, move all your UI code but exclude application specific code, for example `neo-app.json`, `pom.xml`, and `.che`.  
170222

171223
If you are also missing a `manifest.json` file inside of your `webapp` folder, see [UI5 Documentation on Creating a Descriptor File](https://sapui5.hana.ondemand.com/sdk/#/topic/3a9babace121497abea8f0ea66e156d9.html).
@@ -465,6 +517,64 @@ If you still face issues, open a support incident with SAP. When doing so, provi
465517

466518
For more information about how to extract the trace, see [How to capture an HTTP trace using Google Chrome or MS Edge (Chromium)](https://launchpad.support.sap.com/#/notes/1990706).
467519

520+
### Application Fails to Load in SAP Build Work Zone Due to Outdated `minUI5Version`
521+
522+
After migrating your application, the `manifest.json` file contains an outdated `"minUI5Version"` value, for example:
523+
524+
```json
525+
"sap.ui5": {
526+
"dependencies": {
527+
"minUI5Version": "1.84.7"
528+
}
529+
}
530+
```
531+
532+
The application runs correctly in local preview but fails to load when deployed to SAP Build Work Zone (formerly SAP Fiori Launchpad). This is because your local preview fetches the SAPUI5 version configured in your `ui5.yaml` file, whereas SAP Build Work Zone runs its own SAPUI5 version. When the version running in SAP Build Work Zone is lower than the `minUI5Version` declared in your `manifest.json` file, the framework rejects the component and the application fails to load.
533+
534+
#### Replicating the Issue Locally
535+
536+
To identify the SAPUI5 version your SAP Build Work Zone instance is running:
537+
538+
1. Open your deployed application in Google Chrome.
539+
2. Open Developer Tools by pressing `F12`.
540+
3. Select the **Console** tab.
541+
4. Enter the following and press `Enter`:
542+
543+
```text
544+
sap.ui.version
545+
```
546+
547+
The version returned is the SAPUI5 version running in SAP Build Work Zone. Compare this against the `"minUI5Version"` declared in your `manifest.json` file. If the SAP Build Work Zone version is lower, the application does not load.
548+
549+
#### Solution
550+
551+
Update the `"minUI5Version"` in your `manifest.json` file to a version that is equal to or lower than the SAPUI5 version running in SAP Build Work Zone. You must also align the `_version` property at the root of the `manifest.json` file to the manifest schema version that corresponds to your target SAPUI5 version.
552+
553+
To identify supported and maintained SAPUI5 versions and their corresponding manifest schema versions, see the following resources:
554+
555+
- [SAPUI5 Versions Maintenance Status](https://ui5.sap.com/versionoverview.html)
556+
- [UI5 Manifest Version Mapping](https://github.com/UI5/manifest/blob/main/mapping.json)
557+
558+
The manifest version mapping defines which manifest `_version` corresponds to each SAPUI5 version. For example, SAPUI5 version `1.140` maps to manifest `_version` `1.78.0`.
559+
560+
Update your `manifest.json` file as follows. Ensure both `_version` and `minUI5Version` are aligned:
561+
562+
```json
563+
{
564+
"_version": "1.78.0",
565+
"sap.app": {
566+
...
567+
},
568+
"sap.ui5": {
569+
"dependencies": {
570+
"minUI5Version": "1.140.0"
571+
}
572+
}
573+
}
574+
```
575+
576+
Choose a version that is within the maintenance window and compatible with the SAPUI5 version deployed to your SAP Build Work Zone instance.
577+
468578
## License
469579

470580
Copyright (c) 2009-2026 SAP SE or an SAP affiliate company. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](../LICENSES/Apache-2.0.txt) file.

0 commit comments

Comments
 (0)