cancel
Showing results for 
Search instead for 
Did you mean: 

Error updating SAPUI5 version using UI5 Tooling

09-20-2023 1:10 PM
adamharkus Participant
9726 views 7 comments
0 Likes
SAP Managed Tags
Subscribe

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?

0 Likes

Accepted Solutions (0)

Answers (3)

Answers (3)

vykuntrao
Participant
0 Likes

am getting below error after installing ui5/cli globally .Not sure why??

ThomasMundt
Participant
0 Likes

Another (recommended) way is to install UI5 CLI globally like so. Then you do not need installing it in your project but having it globally (for all projects/repos).

npm i -g @ui5/cli
AlexNecula30
Active Contributor
0 Likes

Try to update UI5 CLI using command

npm i @ui5/cli
adamharkus
Participant
0 Likes

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 Likes

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.
AlexNecula30
Active Contributor
0 Likes

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 Likes

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

Thank you.