Jmix-studio-2.0.4-232 view error

Hi,

I have just installed the latest version of Jmix Studio (2.0.4-232) into IntelliJ 2023.2.2. I have already experienced some issues with the view editor and the preview screen and it seems the issue has not been solved yet. Currently I use gradle 7.0.6, Node.js 18.18.0 with Java 17 to run Jmix, but I get an error message regarding installing NodeStacktrace when I want to run/restart the preview screen of a view. Also I cannot add any UI components to it (receiving a ‘component’ cannot be added here’ error message) except by editing the xml itself (view → layout does not appear in the view hierarchy - please check attached image).

Could you please help me out how to solve this issue?

Thanks,
Peter

jmix_error

Hi,

What OS are you using?

It seems that view designer is trying to find nodejs on the computer, but does not find it and tries to install it. Is nodejs installed globally? Is it accessible by the “node -v” command?

Also, view designer installs node js on the path <user_home>/.vaadin. Check if there are any files there? You can try to delete them.

P.S.: check if there is stable access to the network during the installation of nodejs.

Regards,
Mikhail

Hey,
I used to have a similar problem.I just needed to manually install pnpm using the following command: npm install --g pnpm .
It worked for me; you can give it a try!

1 Like

Hi Mikhail,

I have the same problem. Nodejs is installed globally (v18.18) and accessible. I deleted .vaadin folder. I installed also pnpm and as I behind corporate proxy, I set also the registry for pnpm.

So however nodejs is installed globally, I have the followings in the log:
2023-10-17 10:13:04 LOG INFO: Running pnpm install to resolve and optionally download frontend dependencies. This may take a moment, please stand by…
2023-10-17 10:13:04 LOG INFO: Using node 18.18.0 located at C:\Program Files\nodejs\node.exe
2023-10-17 10:13:17 LOG INFO: Using npm 9.8.1 located at C:\Program Files\nodejs\npm.cmd

2023-10-17 10:15:17 LOG INFO: Frontend dependencies resolved successfully.

But later:
2023-10-17 10:15:25 LOG INFO: Executing task: TaskCopyFrontendFiles
2023-10-17 10:15:25 LOG INFO: Copying frontend resources from jar files …
2023-10-17 10:15:26 LOG INFO: Visited 2 resources. Took 224 ms.
2023-10-17 10:15:26 LOG INFO: Executing task: TaskCopyLocalFrontendFiles
2023-10-17 10:15:26 LOG INFO: Executing task: TaskUpdateSettingsFile
2023-10-17 10:15:26 LOG INFO: Executing task: TaskUpdateVite
2023-10-17 10:15:26 LOG INFO: Created vite configuration file: ‘C:\Users\JakusMB\IdeaProjects\jmix-202-poc.jmix\screen-designer\vite.config.ts’
2023-10-17 10:15:26 LOG INFO: Executing task: TaskUpdateImports
2023-10-17 10:15:26 LOG INFO: Executing task: TaskUpdateThemeImport
2023-10-17 10:15:26 LOG INFO: Executing task: TaskCopyTemplateFiles
2023-10-17 10:15:26 LOG INFO: Starting Vite
2023-10-17 10:15:26 LOG INFO: Node not found in C:\Users\JakusMB.vaadin. Installing node v18.14.1.
2023-10-17 10:15:26 LOG INFO: Installing node version v18.14.1
2023-10-17 10:15:26 LOG INFO: Downloading https://nodejs.org/dist/v18.14.1/node-v18.14.1-win-x64.zip to C:\Users\JakusMB.vaadin\node-v18.14.1-win-x64.zip
2023-10-17 10:15:26 LOG INFO: No proxy was configured, downloading directly
2023-10-17 10:15:27 LOG INFO: Unpacking C:\Users\JakusMB.vaadin\node-v18.14.1-win-x64.zip (2242 bytes) into C:\Users\JakusMB.vaadin\node\tmp
2023-10-17 10:15:27 LOG INFO: DevServer start failed. Cause: java.lang.IllegalStateException: Failed to install Node Message: java.lang.IllegalStateException: Failed to install NodeStacktrace:
[java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332), java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347), java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:874), java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841), java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483), java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373), java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182), java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655), java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622), java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)]
2023-10-17 10:15:27 LOG INFO: DevServer start failed. Cause: java.lang.IllegalStateException: Failed to install Node Message: java.lang.IllegalStateException: Failed to install NodeStacktrace:
[java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332), java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347), java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:874), java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841), java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483), java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373), java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182), java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655), java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622), java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)]

Hi,

I will take a closer look at this problem and create an issue.
For now, I can suggest trying to install node in the {home_directory}/.vaadin folder.

Regards,
Mikhail

Hi Mikhail,

Unfortunately, the solution you suggested does not work for me. I also tried to clean/delete the .vaadin folder but it did not solve this issue either. Please check what causes this issue and provide a fix.

Thanks,
Peter

1 Like

Hi,
I added a link to the topic in a similar ticket IllegalStateException: Failed to install Node · Issue #2177 · jmix-framework/jmix · GitHub

Regards,
Mikhail