Can't build OpenRemote Manager UI. Status = 126

I’m trying to build and deploy a custom OpenRemote instance. I cloned the default template and followed all the steps described in User Guide: Custom deployment · openremote/openremote Wiki · GitHub
1,2,3 - items went smothly, both containers are up, but i’m stuck with building the Manager UI.
npm run serve – --env config=…/…/…/…/deployment/manager/app gives me

:~/openremote-custom/openremote/ui/app/manager$ npm run serve

@openremote/manager@1.0.4 serve
npx tsc -b --clean && npx shx rm -rf dist && npx orutil build && npx cross-env NODE_OPTIONS=–max_old_space_size=4096 webpack serve --mode development

Running gradlew modelBuild task in /home/den/openremote-custom …
gradlew modelWatch finished! Status = 126
npm ERR! Lifecycle script serve failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: @openremote/manager@1.0.4

dist directory was not created and it looks like typescript wasn’t compiled.

Did anybody face similar issues during the UI build process?

Potentially a problem with your tool chain, can you try the following and paste the output:

./gradlew modelWatch

Hi, Rich, thanks for your answer, i tried that too, but i’m not sure in which directory exactly I have to execute that

:~/openremote-custom/openremote$ ./gradlew modelWatch
Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2
Starting a Gradle Daemon (subsequent builds will be faster)

Task :model:compileJava FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:model:compileJava’.

error: invalid source release: 17

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See Command-Line Interface

BUILD FAILED in 15s
1 actionable task: 1 executed
:~/openremote-custom/openremote$ java -version
Picked up JAVA_TOOL_OPTIONS: -Dhttps.protocols=TLSv1.2
openjdk version “17.0.3” 2022-04-19
OpenJDK Runtime Environment (build 17.0.3+7-Ubuntu-0ubuntu0.20.04.1)
OpenJDK 64-Bit Server VM (build 17.0.3+7-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)

The intention was to get more detailed information about your error and I can now see:

error: invalid source release: 17

You need JDK 17 to be able to run/build the code base.

1 Like

Hello,

Same as @vbeliavski I’m trying to build and deploy a custom OpenRemote on windows. I cloned the default template and followed all the steps described in Custom deployment User Guide.

Step 1,2,3 went smoothly, both containers are up,

While building Manager UI at step 4, I am seeing the following error,

C:\Users\user\openremote\custom-project\openremote\ui\app\manager>npm run serve – --env config=…......\deployment\manager\app

@openremote/manager@1.0.4 serve C:\Users\user\openremote\custom-project\openremote\ui\app\manager
npx tsc -b --clean && npx shx rm -rf dist && npx orutil build && npx cross-env NODE_OPTIONS=–max_old_space_size=4096 webpack serve --mode development “–env” “config=…......\deployment\manager\app”

npx: installed 22 in 4.492s
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/orutil - Not found
npm ERR! 404
npm ERR! 404 ‘orutil@latest’ is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache_logs\2022-10-04T06_25_20_399Z-debug.log
Install for [ ‘orutil@latest’ ] failed with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @openremote/manager@1.0.4 serve: npx tsc -b --clean && npx shx rm -rf dist && npx orutil build && npx cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack serve --mode development "--env" "config=..\..\..\..\deployment\manager\app"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @openremote/manager@1.0.4 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache_logs\2022-10-04T06_25_20_506Z-debug.log

Can anyone help?

Those errors are coming from the node tasks which build the UI; please ensure you have the pre-requisites versions installed as described in the wiki:

In case someone faces the same issue, even after following wiki. I have Node version 18, but I had to install corepack by myself using:

npm i -g corepack

and then corepack enable and yarn init -2

We had exactly the same error, what worked for us (besides the mentioned JDK 17) was setting the JAVA_HOME as well, and making sure that the tmp dir and deployment/manager/app/ dir had the right permissions set.

1 Like

following @Rich recommendation I ran ./gradlew modelWatch --debug and found that even though JDK 17 was installed an old JDK 11 was being used (and failing). A quick trip to the AppData folder found the culprit and the rebuild was successful.

1 Like