openremote / custom-project

Template repo for creating an OpenRemote custom project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build stuck on `:openremote:ui:component:or-icon:copyMdiFont`

kazetsukaimiko opened this issue · comments

Running a clean clone of the custom-project template using:
./gradlew clean installDist --info

I get:

> Task :openremote:ui:component:or-icon:copyMdiFont FAILED
Caching disabled for task ':openremote:ui:component:or-icon:copyMdiFont' because:
  Build cache is disabled
Task ':openremote:ui:component:or-icon:copyMdiFont' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Starting process 'command 'npm''. Working directory: /home/reven/openremote/openremote/ui/component/or-icon Command: npm run copyMdiFont
:openremote:ui:component:or-icon:copyMdiFont (Thread[Execution worker for ':' Thread 4,5,main]) completed. Took 0.006 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':openremote:ui:component:or-icon:copyMdiFont'.
> A problem occurred starting process 'command 'npm''

Trying to figure out how to build and start a production environment.

Hi, please use the forum for these discussions until there is a proven bug.

Looking at the output, have you installed the dependencies as described in the wiki....seems like node/npm is missing.

@richturner I resolved the dependency problem early on. If you look closer at the output, you see:

Task ':openremote:ui:component:or-icon:copyMdiFont' is not up-to-date because:
  Task has not declared any outputs despite executing actions.

This suggests that the task hasn't produced output that gradle can use as a cache key.

Versions for everything:

reven@vps2721177:~/openremote$ java -version
openjdk version "17.0.8.1" 2023-08-24
OpenJDK Runtime Environment (build 17.0.8.1+1-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 17.0.8.1+1-Ubuntu-0ubuntu122.04, mixed mode, sharing)
reven@vps2721177:~/openremote$ git --version
git version 2.34.1
reven@vps2721177:~/openremote$ node -v
v16.20.2
reven@vps2721177:~/openremote$ yarn -v
3.2.0
reven@vps2721177:~/openremote$ npm -v
8.19.4

The up-to-date message from gradle is used to figure out which tasks need to execute, it just indicates that there is no caching supported for this task so it always executes.

The execution of the task is what is failing as shown in the rest of the log and it suggests npm is not a known command, you might see more useful output by manually running the npm command:

cd openemote/ui/component/or-icon
npm run copyMdiFont

The command seems to complete successfully.

reven@vps2721177:~/openremote/openremote/ui/component/or-icon$ npm run copyMdiFont

> @openremote/or-icon@1.1.0 copyMdiFont
> node mdi-font-copy.js

reven@vps2721177:~/openremote/openremote/ui/component/or-icon$ echo $?
0

Does gradle expect npm to be in a specific directory?

reven@vps2721177:~/openremote/openremote/ui/component/or-icon$ which npm
/home/reven/.nvm/versions/node/v16.20.2/bin/npm

npm should be on your PATH which I guess it is as the command runs successfully.

Can you try running the ./gradlew clean installDist again (if you didn't already)