cancel
Showing results for 
Search instead for 
Did you mean: 

Error updating SAPUI5 version using UI5 Tooling

adamharkus
Participant
0 Kudos

I have a pretty standard ui5.yaml setup as follows..

specVersion: "2.3"
metadata:
  name: itcpc.cms
type: application
framework:
  name: SAPUI5
  version: "1.84.26"
  libraries:
    - name: sap.ui.core
    - name: sap.m
    - name: sap.tnt
    - name: themelib_sap_fiori_3
server:
  customMiddleware:
    - name: odataProxy
      beforeMiddleware: serveResources

I've attempted to update the SAPUI5 version like so..

$ yarn ui5 use sapui5@latest

This correctly updates my ui5.yaml file.

But when I run ui5 serve, I get the following error on the sap.tnt dependency.

info normalizer:translators:ui5Framework Using SAPUI5 version: 1.118.0

⚠️  Process Failed With Error

Error Message:
Invalid ui5.yaml configuration for project @openui5/sap.tnt

Unsupported "specVersion"

C:\Users\10119451\.ui5\framework\packages\@openui5\sap.tnt\1.118.0\ui5.yaml:2

1: ---
2: specVersion: "3.0"
   ^
Your UI5 CLI installation might be outdated.
Supported specification versions: "2.3", "2.2", "2.1", "2.0", "1.1", "1.0", "0.1"
For details see: https://sap.github.io/ui5-tooling/pages/Configuration/#specification-versions

For details, execute the same command again with an additional '--verbose' parameter
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What steps do I need to take to resolve?

View Entire Topic
AlexNecula
Active Contributor
0 Kudos

Try to update UI5 CLI using command

npm i @ui5/cli
adamharkus
Participant
0 Kudos

This updated the cli from 2.10.4 to 2.14.19

Tried a yarn install to link dependencies.

Very similar error but this time the version the specification version have increase from 2.3 to 2.6.

$ ui5 serve
info normalizer:translators:ui5Framework Using SAPUI5 version: 1.118.0

⚠️  Process Failed With Error

Error Message:
Invalid ui5.yaml configuration for project @openui5/sap.tnt

Unsupported "specVersion"

C:\Users\10119451\.ui5\framework\packages\@openui5\sap.tnt\1.118.0\ui5.yaml:2

1: ---
2: specVersion: "3.0"
   ^
Your UI5 CLI installation might be outdated.
Supported specification versions: "2.6", "2.5", "2.4", "2.3", "2.2", "2.1", "2.0", "1.1", "1.0", "0.1"
For details see: https://sap.github.io/ui5-tooling/pages/Configuration/#specification-versions

For details, execute the same command again with an additional '--verbose' parameter
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
adamharkus
Participant
0 Kudos

I've also tried going down the road of amending the specVersion in all my dependencies..

E.g..

specVersion: "2.6"
type: library
metadata:
  name: sap.tnt
  copyright: |-
   OpenUI5
    * (c) Copyright 2009-${currentYear} SAP SE or an SAP affiliate company.
    * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
resources:
  configuration:
    propertiesFileSourceEncoding: ISO-8859-1
But this mean changing dependencies of dependencies so not sure if that's the right way to go.
AlexNecula
Active Contributor
0 Kudos

In one of my project my @ui5/cli is at version 3.5.0 and it might not be the last. Not sure why yours went to 2.14.

This is how my dependencies look in package.json, you can try to replace the version manually in package.json and then use npm install

adamharkus
Participant
0 Kudos

I've set the specVersion to 2.6 in all affected dependencies and now it runs fine.

Thank you.