skip to Main Content

I am trying to run sap ui5 application inside docker.The docker final command runs the script in package.json as
"dock": "ui5 serve -o index.html –accept-remote-connections", But when running this am getting the following error

Process Failed With Error
Error Message:
Cannot read properties of undefined (reading ‘status’).

Appreciate any help on this.

2

Answers


  1. Check if your application has a code similar to this fix:

    if (error.response.status === 404) {
    

    Replace it with:

    if (error.response && error.response.status === 404) {
    
    Login or Signup to reply.
  2. Try the following command instead and see what the output is:

    ui5 serve --accept-remote-connections --verbose
    

    Without context, your error could be caused by many things. The above command should provide more information, which can help you identifying the cause.

    Typically you also do not want to use the -o (or --open) flag in docker. It will attempt to launch a browser, which is often not available in a docker container. This might cause issues too.

    Reference: https://sap.github.io/ui5-tooling/pages/CLI/#ui5-serve

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search