Build Failure mvn openmrs-sdk:setup linux mint

Application Name: OpenMrs mvn openmrs-sdk:setup Version Number: Reference Application 3.x and 3.7.0-SNAPSHOT

Question: Hi I am trying to run openmrs-sdk:setup I have confirmed java is installed. The docker image is running. I run into build failure here is the end of the log. Any help is appreciated;

Thanks

[INFO] [openmrs] Error: × Module not found: Can’t resolve ‘@react-aria/utils’ in ‘/tmp/openmrs-sdk-node4714340225290524215/npm-cache/_npx/fc83492e9362cbff/node_modules/@openmrs/esm-styleguide/dist/datepicker’ [INFO] ╭─[145:0] [INFO] 143 │ import { mergeProps, useDateSegment, useFocusRing, useHover, useObjectRef } from “react-aria”; [INFO] 144 │ import { DateFieldStateContext } from “react-aria-components”; [INFO] 145 │ import { filterDOMProps } from “@react-aria/utils”; [INFO] · ─────────────────────────────────────────────────── [INFO] 146 │ import { useRenderProps } from “./hooks.js”; [INFO] 147 │ /** [INFO] ╰──── [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 02:07 min [INFO] Finished at: 2026-04-16T11:59:53-07:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:6.8.0:setup (default-cli) on project standalone-pom: Failed to setup server: Unable to install spa with node: Unable to execute mojo: Failed to run task: ‘npm --legacy-peer-deps --cache=/tmp/openmrs-sdk-node4714340225290524215/npm-cache exec – openmrs@9.0.3-pre.4342 build --target /home/andrew/openmrs/server1/frontend --build-config /home/andrew/openmrs/server1/spa-build-config.json’ failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) → [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] MojoExecutionException - Apache Maven - Apache Software Foundation

So sorry for this error. The error above is because npm didn’t install a required dependency for @openmrs/esm-styleguide during the SPA build. This is a common hiccup when working with a SNAPSHOT version. Builds are essentially “work in progress,” dependencies can sometimes become misaligned in the automated build pipeline. Kindly do you mind switching to a stable release 3.6.0?

I tried 3.6 and 3.4 no luck same errors.

Kindly share the error you are getting when running a stable version please!

@andrewp Looking at the error log again, I see the build is using a specific temporary directory: /tmp/openmrs-sdk-node.... Often, a corrupted or incomplete download in this cache causes the “Module not found” error.

Kindly you can manually clear your npm cache and the temporary OpenMRS SDK artifacts. By running this commands :

npm cache clean --force  
rm -rf /tmp/openmrs-sdk-node*

Then run the mvn openmrs-sdk:setup command again.

After running these:

npm cache clean --force
rm -rf /tmp/openmrs-sdk-node*

You could try installing the react-aria/utils package manually like this:

npm install @react-aria/utils

It worked for me

I’m getting the same error as OP when setting up 3.0 with 3.7.0. But this suggested fix isn’t helping my system. :\

See this line from OP’s logs:

[INFO] [openmrs] Error: × Module not found: Can’t resolve ‘@react-aria/utils’ in ‘/tmp/openmrs-sdk-node4714340225290524215/npm-cache/_npx/fc83492e9362cbff/node_modules/

It shows that the issue was the missing @react-aria/utils dependency. Do your logs show something similar? Perhaps it is some other missing dependency

mvn openmrs-sdk:setup.log.txt (28.0 KB)

Okay, I attached the entire output.

I get this same error on a MacBook, Fedora 43, and fresh Fedora 44 installation.

I’ve used SDKMAN to install the following versions of

Java: openjdk version “1.8.0_482” OpenJDK Runtime Environment (build 1.8.0_482-b10) OpenJDK 64-Bit Server VM (build 25.482-b10, mixed mode)

Maven: Apache Maven 3.9.15 (98b2cdbfdb5f1ac8781f537ea9acccaed7922349) Maven home: /home/cameron/.sdkman/candidates/maven/current Java version: 1.8.0_482, vendor: BellSoft, runtime: /home/cameron/.sdkman/candidates/java/8.0.482-librca/jre Default locale: en_US, platform encoding: UTF-8 OS name: “linux”, version: “6.19.14-300.fc44.x86_64”, arch: “amd64”, family: “unix”

I just want to add that I did find this other setup page: O3 Setup, Configuration & Deployment

In this walkthrough, it mentions

To ignore ‘peerDependencies’ when building the frontend, you can use the following command:

$ mvn openmrs-sdk:setup -DignorePeerDependencies=true

By setting the ‘ignorePeerDependencies’ property to ‘true’, you can mitigate the following error:

Module not found: Error: Can't resolve '@openmrs/esm-react-utils' in '/tmp/openmrs-sdk-node11424498487737231975/npm-cache/_npx/9145365975c7e340/node_modules/@openmrs/esm-styleguide/src/error-state'


This seems like it’s BASICALLY the same issue that we are running into but even running with this flag doesn’t fix the issue.

Seems this was due to an old CI Automation being missed when migrating jobs to GH Actions. As discussed in the openmrs3 channel here: Slack

If you experienced this issue, try syncing your fork now and rebuilding.