You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a project with the ui5-proxy-middleware configured in the ui5.yaml and you start it from the outside e.g. ui5 server --config ./my-project/ui5.yaml then the middleware crashes when trying to find the manifest.json.
Steps to Reproduce
Steps to reproduce the behavior:
Generate a project with the SAP Fiori generator
(install the ui5 cli globally)
Run ui5 serve outside the project directory but pointing to the config inside
See error
Expected results
The preview starts as expected,
Actual results
The middleware crashes because it cannot find the manifest.json to read the minUI5Version
Expected fix
This issue requires two fixes
Don't rely on the cwd but use the ui5 tooling provided fs to find project files
Even if a manifest.json is not found e.g. for an adaptation project, the middleware should not crash but just assume the latest UI5 version
If your middleware would work with the UI5 tooling version 3.0 only, you could run the following code to determine the project root in your custom middleware:
tobiasqueck
changed the title
BUG - ui5-proxy-middleware crashes on startup if the cwd is on the root of the project
BUG - ui5-proxy-middleware crashes on startup if the cwd is not the root of the project
Jun 1, 2023
Related Feature
Feature request: issue number
Description
If you have a project with the
ui5-proxy-middleware
configured in theui5.yaml
and you start it from the outside e.g.ui5 server --config ./my-project/ui5.yaml
then the middleware crashes when trying to find themanifest.json
.Steps to Reproduce
Steps to reproduce the behavior:
ui5 serve
outside the project directory but pointing to the config insideExpected results
The preview starts as expected,
Actual results
The middleware crashes because it cannot find the
manifest.json
to read theminUI5Version
Expected fix
This issue requires two fixes
cwd
but use the ui5 tooling providedfs
to find project filesmanifest.json
is not found e.g. for an adaptation project, the middleware should not crash but just assume the latest UI5 versionAdditional Information
Conversation with @petermuessig
Screenshots
If applicable, add screenshots to help explain the problem.
Version/Components/Environment
Add any other context about the problem here
OS:
Root Cause Analysis
Problem
{describe the problem}
Fix
{describe the fix}
Why was it missed
{Some explanation why this issue might have been missed during normal development/testing cycle}
How can we avoid this
{if we don’t want to see this type of issues anymore what we should do to prevent}
The text was updated successfully, but these errors were encountered: