SAP/ui5-tooling

check for node and npm engine seams not to work in @ui5/cli v4.x.x

Closed this issue · 2 comments

Expected Behavior

As documented here, I would expect an error due to not using a node/npm version allowed.

Current Behavior

For me, it seams to run flawless with node v20.14.0 and npm 10.7.0, see chapter log output.
Also starting the dev server works.

Steps to Reproduce the Issue

  1. Use your existing UI5 project with ui5/cli v3.x.x
  2. delete package-lock.json
  3. upgrade all npm modules to latest version (at least @ui5/cli to v4.x.x)
  4. run ui5/cli in terminal

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 4.0.8
  • Node.js Version: 20.14.0
  • npm Version: 10.7.0
  • OS/Platform: macOS
  • Browser (if relevant): unknown
  • Other information regarding your environment (optional): nothing

Log Output / Stack Trace

user@computer directory % node -v
v20.14.0
user@computer directory % npm -v
10.7.0
user@computer directory % % npm list @ui5/cli               
directory
├── @ui5/cli@4.0.8
└─┬ directory library
  └── @ui5/cli@4.0.8

user@computer directory % ui5 --help --verbose
INFO: This project contains an individual @ui5/cli installation which will be used over the global one.
See https://github.com/SAP/ui5-cli#local-vs-global-installation for details.

Usage: ui5 <command> [options]

Commands:
  ui5 add [--development] [--optional] <framework-libraries..>  Add SAPUI5/OpenUI5 framework libraries to the project configuration.
  ui5 build                                                     Build project in current directory
  ui5 config                                                    Get and set UI5 Tooling configuration options
  ui5 init                                                      Initialize the UI5 Tooling configuration for an application or library proje
                                                                ct.
  ui5 remove <framework-libraries..>                            Remove SAPUI5/OpenUI5 framework libraries from the project configuration.
  ui5 serve                                                     Start a web server for the current project
  ui5 tree                                                      Outputs the dependency tree of the current project to stdout. It takes all r
                                                                elevant parameters of ui5 build into account.            [aliases: ls, list]
  ui5 use <framework-info>                                      Initialize or update the project's framework configuration.
  ui5 versions                                                  Shows the versions of all UI5 Tooling modules

Options:
  -h, --help                   Show help                                                                                           [boolean]
  -v, --version                Show version number                                                                                 [boolean]
  -c, --config                 Path to project configuration file in YAML format                                                    [string]
      --dependency-definition  Path to a YAML file containing the project's dependency tree. This option will disable resolution of node pac
                               kage dependencies.                                                                                   [string]
      --workspace-config       Path to workspace configuration file in YAML format                                                  [string]
  -w, --workspace              Name of the workspace configuration to use                                      [string] [default: "default"]
      --loglevel, --log-level  Set the logging level
                                         [string] [choices: "silent", "error", "warn", "info", "perf", "verbose", "silly"] [default: "info"]
      --verbose                Enable verbose logging.                                                            [boolean] [default: false]
      --perf                   Enable performance measurements and related logging.                               [boolean] [default: false]
      --silent                 Disable all log output.                                                            [boolean] [default: false]

Examples:
  ui5 <command> --dependency-definition /path/to/projectDependencies.yam  Execute command using a static dependency tree instead of resolvin
  l                                                                       g node package dependencies
  ui5 <command> --config /path/to/ui5.yaml                                Execute command using a project configuration from custom path
  ui5 <command> --workspace dolphin                                       Execute command using the 'dolphin' workspace of a ui5-workspace.y
                                                                          aml
  ui5 <command> --log-level silly                                         Execute command with the maximum log output

The linked documentation states the following:

This release requires Node.js versions v20.11.0, v22.0.0, or higher

Basically we support everything above v20.11.0, except for the v21 releases. This means v20.14.0 is supported and therefore no error is reported. I guess we could improve the wording in the documentation to make this more clear.

Please let us know if you still see this as an issue.

Hi Merlin, thanks for the fast response!
If only v21 is not supported I'm fine and my setup is OK.
You are right: to write it in the documentation exactly as you wrote here would have helped me :-)