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?
@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 :
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.