Running Mender GUI standalone - Errors - Need Help

Hi,
the GUI expects to run inside the container/ docker image it’s distributed in (so the gulp remark is mostly relevant to development on the GUI), which is why you are seeing the error. The mentioned env.js file is a reference to server side configuration that configures the GUI and is set on container startup based on the environment the container is started in (defined here).
But it should be possible to use the GUI outside of the container, if you create the env.js and put it into the dist folder aswell. For your setup I think the content of the env.js should look like

mender_environment = {
    hostAddress: "$HOSTNAME",
    hostedAnnouncement: "",
    isDemoMode: "0",
    features: {
      hasMultitenancy: "1",
      isEnterprise: "0",
      isHosted: "1"
    },
    integrationVersion: "2.3.0",
    menderVersion: "2.2.0",
    menderArtifactVersion: "3.3.0",
    menderDebPackageVersion: "2.2.0",
    metaMenderVersion: "master",
    services: {
      deploymentsVersion: "",
      deviceauthVersion: "",
      guiVersion: "custom",
      inventoryVersion: ""
    },
    demoArtifactPort: "85",
    disableOnboarding: "0"
}

However once this is done you will have to configure your webserver to forward all requests made to paths starting with /api/ to Hosted Mender, since the GUI expects to be run alongside the backend. Or you could prepend the base urls in all the redux action files (these here) to make them point to https://hosted.mender.io/api/… .

It should be possible to run the GUI as standalone, but I’m not entirely sure about possible other implications.